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.
master
Benno Schulenberg 2020-02-26 09:34:34 +01:00
parent b15c5a7eaf
commit 2fd6181873
1 changed files with 1 additions and 0 deletions

View File

@ -519,6 +519,7 @@ bool is_cuttable(bool test_cliff)
(openfile->mark == openfile->current && (openfile->mark == openfile->current &&
openfile->mark_x == openfile->current_x) || openfile->mark_x == openfile->current_x) ||
(test_cliff && openfile->current->data[openfile->current_x] == '\0' && (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) ||
(!ISSET(NO_NEWLINES) && openfile->current == openfile->filebot->prev)) (!ISSET(NO_NEWLINES) && openfile->current == openfile->filebot->prev))
#endif #endif