gitbutler icon indicating copy to clipboard operation
gitbutler copied to clipboard

Enter at beginning of a line should move text

Open koppor opened this issue 1 year ago • 5 comments

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

koppor avatar Aug 29 '24 08:08 koppor

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.

Byron avatar Aug 29 '24 11:08 Byron

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.

koppor avatar Aug 29 '24 22:08 koppor

cc @PavelLaptev

mtsgrd avatar Sep 01 '24 12:09 mtsgrd

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

PavelLaptev avatar Sep 03 '24 14:09 PavelLaptev

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

estib-vega avatar Sep 04 '24 12:09 estib-vega

I confirm that it works.

Now, Del at the beginning of the line (no issue filed yet; will do as soon as I start missing it) and Cursor down (https://github.com/gitbutlerapp/gitbutler/issues/5095) should work.

koppor avatar Oct 11 '24 08:10 koppor