gitbutlerapp / gitbutler

The GitButler version control client, backed by Git, powered by Tauri/Rust/Svelte
https://gitbutler.com
Other
12.63k stars 500 forks source link

Enter at beginning of a line should move text #4790

Open koppor opened 1 month ago

koppor commented 1 month ago

Version

0.12.21

Operating System

Windows

Distribution Method

msi (Windows)

Describe the issue

Enter should move text

How to reproduce

  1. Add something in the first line of commit message
  2. Press Pos1
  3. Press Enter\ image
  4. Cursor is moved down.

Expected behavior

Text and cursor should be moved down - and first line empty

Relevant log output

No response

Byron commented 1 month ago

Thanks for reporting!

I can confirm that the cursor only moves down on enter if the commit text field isn't empty.

I couldn't reproduce the behaviour with Pos1 (as this key doesn't exist on my keyboard), nor could I reproduce it by moving the cursor to the beginning of the first line by pressing Ctrl + a - Enter would work as expected.

Maybe it can be considered a feature not to allow leading with a newline and to disallow moving the cursor down with Enter if the textbox is entirely empty. Probably this makes the described behaviour specific to Windows, so I at best partially reproduced it on MacOS.

koppor commented 1 month ago

I can confirm that the cursor only moves down on enter if the commit text field isn't empty.

Normal text editors move the letters following the cursor to the next line. Before, they move all subsequent lines down by one line. - GitButler just moves the cursor.

mtsgrd commented 1 month ago

cc @PavelLaptev

PavelLaptev commented 1 month ago

@estib-vega if you have time, could you please take a look :-)

estib-vega commented 1 month ago

Merged the fix in https://github.com/gitbutlerapp/gitbutler/pull/4826