nano

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

commit 728498fde56ef202d011310c723bc8f07cb4c281
parent 05f34bbfafbc3a385300b4189b14e75c58927923
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 26 May 2019 19:45:58 +0200

files: don't say "Error...: Success" when aborting after resizing

For some reason 'errno' is not EINTR but zero when a SIGINT is
produced after a SIGWINCH.

Diffstat:
Msrc/files.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/files.c b/src/files.c @@ -960,7 +960,7 @@ int open_file(const char *filename, bool newfie, FILE **f) #endif if (fd == -1) { - if (errno == EINTR) + if (errno == EINTR || errno == 0) statusline(ALERT, _("Interrupted")); else statusline(ALERT, _("Error reading %s: %s"), filename, strerror(errno)); @@ -1835,7 +1835,7 @@ bool write_file(const char *name, FILE *f_open, bool tmp, /* If we couldn't open the file, give up. */ if (fd == -1) { - if (errno == EINTR) + if (errno == EINTR || errno == 0) statusline(ALERT, _("Interrupted")); else statusline(ALERT, _("Error writing %s: %s"), realname,