commit 2fd618187338f9f3b6fbe701c437ea6dac646548
parent b15c5a7eafef10775ac20f2a57f0f6cc9247a0c8
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 26 Feb 2020 09:34:34 +0100
cutting: with --cutfromcursor, allow ^K to cut the penultimate empty line
This fixes https://savannah.gnu.org/bugs/?57897.
Bug existed since version 4.0, commit 67873e96.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/src/cut.c b/src/cut.c
@@ -519,6 +519,7 @@ bool is_cuttable(bool test_cliff)
(openfile->mark == openfile->current &&
openfile->mark_x == openfile->current_x) ||
(test_cliff && openfile->current->data[openfile->current_x] == '\0' &&
+ openfile->current_x > 0 &&
((ISSET(NO_NEWLINES) && openfile->current == openfile->filebot) ||
(!ISSET(NO_NEWLINES) && openfile->current == openfile->filebot->prev))
#endif