nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit cbeea859c2e6a71bab086719bf10d151278c60e0
parent 422cd726fa6cee2e906fee30469402dd3c004b1e
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 10 Feb 2020 09:24:35 +0100

shutdown: don't refer to an open file when there aren't any

This fixes https://savannah.gnu.org/bugs/?57780.

Bug existed since commit b63c90bf from yesterday.

Diffstat:
Msrc/nano.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/nano.c b/src/nano.c @@ -340,9 +340,8 @@ void finish(void) /* If the user wants history persistence, write the relevant files. */ if (ISSET(HISTORYLOG)) save_history(); - if (ISSET(POSITIONLOG)) { + if (ISSET(POSITIONLOG) && openfile) update_poshistory(openfile->filename, openfile->current->lineno, xplustabs() + 1); - } #endif /* Get out. */