nano

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

commit d656b0d3b9a1fe21fc8eea30d68f8be1362cce9f
parent d9deaf9f2f1fefee3b17daaf8d0754e96b0c2653
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Tue, 28 May 2019 17:01:31 +0200

feedback: show an appropriate message when reading a file was cut short

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

diff --git a/src/files.c b/src/files.c @@ -747,8 +747,10 @@ void read_file(FILE *f, int fd, const char *filename, bool undoable) /* Read the entire file into the new buffer. */ while ((input_int = getc_unlocked(f)) != EOF) { - if (control_C_was_pressed) + if (control_C_was_pressed) { + statusline(ALERT, _("Interrupted")); break; + } input = (char)input_int;