nano

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

commit 5dee9fb2c663f698a107c4cea00772c9c5298e0e
parent f0c65bc9887ce74b8349dd7763070997b408a6d3
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Tue,  7 Jun 2016 10:15:25 +0200

files: it is fine to "change" the name of a nameless buffer

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

Diffstat:
Msrc/files.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/files.c b/src/files.c @@ -2216,7 +2216,7 @@ int do_writeout(bool exiting) append_type append = OVERWRITE; char *given; /* The filename we offer, or what the user typed so far. */ - bool maychange = FALSE; + bool maychange = (openfile->filename[0] == '\0'); /* Whether it's okay to save the file under a different name. */ #ifndef DISABLE_EXTRA static bool did_credits = FALSE;