aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/themelint.rs
diff options
context:
space:
mode:
authorPascal Kuthe2023-02-20 15:31:26 +0000
committerBlaž Hrastnik2023-05-18 06:20:55 +0000
commit25d4ebe30d7920bc087f004075048f62f53726af (patch)
tree2b47474079965eb42d7b3b0bb8455f14a03dcacb /xtask/src/themelint.rs
parent2c3ccc3e8b2487e9bcca271341aabc67811ebb46 (diff)
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
Diffstat (limited to 'xtask/src/themelint.rs')
0 files changed, 0 insertions, 0 deletions