Improve newline behavior of kill-whole-line

Previously, `kill-whole-line` kills the line and its following
newline. This is insufficient when we are on the last line, because
it would not actually clear the line. The cursor would stay on the
line, which is not the correct behavior for bindings like `dd`.

Also, `cc` in vi-mode used `kill-whole-line`, which is not correct
because it should not remove any newlines. We have to introduce
another special input function (`kill-inner-line`) to fix this.
This commit is contained in:
SeekingBlues
2022-05-30 22:12:24 -05:00
committed by ridiculousfish
parent 025acfe45a
commit cf620c829b
6 changed files with 30 additions and 10 deletions

View File

@@ -230,7 +230,10 @@ The following special input functions are available:
move the selected text to the killring
``kill-whole-line``
move the line to the killring
move the line (including the following newline) to the killring. If the line is the last line, its preceeding newline is also removed
``kill-inner-line``
move the line (without the following newline) to the killring
``kill-word``
move the next word to the killring