helix-mods/helix-term/tests/test
Pascal Kuthe 25d4ebe30d don't move cursor while forward deleting in append mode
Currently, when forward deleting (`delete_char_forward` bound to `del`,
`delete_word_forward`, `kill_to_line_end`) the cursor is moved to the
left in append mode (or generally when the cursor is at the end of the
selection). For example in a document `|abc|def`  (|indicates selection)
if enter append mode the cursor is moved to `c` and the selection
becomes: `|abcd|ef`. When deleting forward (`del`) `d` is deleted. The
expectation would be that the selection doesn't shrink so that `del`
again deletes `e` and then `f`. This would look as follows:

`|abcd|ef`
`|abce|f`
`|abcf|`
`|abc |`

This is inline with how other editors like kakoune work.
However, helix currently moves the selection backwards leading to the
following behavior:

`|abcd|ef`
`|abc|ef`
`|ab|ef`
`ef`

This means that `delete_char_forward` essentially acts like
`delete_char_backward` after deleting the first character in append
mode.

To fix the problem the cursor must be moved to the right while deleting
forward (first fix in this commit). Furthermore, when the EOF char is
reached a newline char must be inserted (just like when entering
appendmode) to prevent the cursor from moving to the right
2023-05-18 15:20:55 +09:00
..
commands Conserve BOM and properly support UTF16 (#6497) 2023-05-01 00:40:06 +02:00
auto_indent.rs migrate test_with_config to use AppBuilder 2023-03-20 18:34:40 -05:00
auto_pairs.rs migrate test_with_config to use AppBuilder 2023-03-20 18:34:40 -05:00
commands.rs don't move cursor while forward deleting in append mode 2023-05-18 15:20:55 +09:00
helpers.rs add workspace config and manual LSP root management 2023-03-29 12:57:30 +09:00
movement.rs Fix typos (#6643) 2023-04-07 23:10:38 +08:00
prompt.rs flush writes on force quit (#4397) 2022-10-21 13:28:29 +09:00
splits.rs Canonicalize paths before stripping current dir as prefix (#6290) 2023-03-30 11:21:40 -05:00