From 9ccf85eaa82159f6581cf728d17b82f6e663a685 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 18 Mar 2022 11:40:03 +0100 Subject: [PATCH] tweaks: avoid a function call when two plain assignments will do --- README | 1 - src/text.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README b/README index 840749fa..64fe46a9 100644 --- a/README +++ b/README @@ -119,4 +119,3 @@ Bug Reports (you will need an account to be able to do so), or send an email to the nano-devel list (no need to subscribe, but mention it if you want to be CC'ed on an answer). - diff --git a/src/text.c b/src/text.c index b49229f2..1a81fa34 100644 --- a/src/text.c +++ b/src/text.c @@ -558,7 +558,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)) { - goto_line_posx(openfile->filebot->lineno, 0); + openfile->current = openfile->filebot; + openfile->current_x = 0; break; } line->data[u->tail_x] = '\0';