You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
helix/helix-term/src
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
2 years ago
..
commands Replace DAP vars popup, instead of adding new (#7034) 2 years ago
keymap feat(dap): implement Restart request (#5651) 2 years ago
ui clarify comments about completion savepoints 2 years ago
application.rs tui: Allow toggling mouse capture at runtime (#6675) 2 years ago
args.rs Fix confusion with using --hsplit --vsplit on startup at same time (#4202) 2 years ago
commands.rs don't move cursor while forward deleting in append mode 2 years ago
compositor.rs bump msrv to 1.63 (#5570) 2 years ago
config.rs add workspace config and manual LSP root management 2 years ago
health.rs Generalised to multiple runtime directories with priorities (#5411) 2 years ago
job.rs bump msrv to 1.63 (#5570) 2 years ago
keymap.rs add workspace config and manual LSP root management 2 years ago
lib.rs Fix new clippy lints (#5892) 2 years ago
main.rs add workspace config and manual LSP root management 2 years ago