mirror of git://git.sv.gnu.org/nano.git
undo: force a screen refresh also for the special case Bsp-at-EOF
Because meanwhile the cursor might be someplace where EOF is offscreen. This effectively reverts commit9ccf85ea
from two years ago, but also sets 'focusing' to false so that the last line of the buffer will be at the bottom of the edit window, where it probably was when Bsp was typed. This fixes https://savannah.gnu.org/bugs/?65428. The issue was reported by `correctmost`. Bug existed since version 6.3, commit9ccf85ea
.
This commit is contained in:
parent
c67ea1ffc1
commit
862574f381
|
@ -553,8 +553,8 @@ void do_undo(void)
|
|||
* and the nonewlines flag isn't set, do not re-add a newline that
|
||||
* wasn't actually deleted; just position the cursor. */
|
||||
if ((u->xflags & WAS_BACKSPACE_AT_EOF) && !ISSET(NO_NEWLINES)) {
|
||||
openfile->current = openfile->filebot;
|
||||
openfile->current_x = 0;
|
||||
goto_line_posx(openfile->filebot->lineno, 0);
|
||||
focusing = FALSE;
|
||||
break;
|
||||
}
|
||||
line->data[u->tail_x] = '\0';
|
||||
|
|
Loading…
Reference in New Issue