nano

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

commit 0da554e6d712dcd1a39b1742e106c26a30760fb1
parent f1530c7ba0b15fcc49dadfb3a01257b1e30b546a
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sat, 28 Apr 2018 17:50:51 +0200

startup: suggest using ^D to finish reading from standard input

Also, add a period after the "Read nn lines" message, and
don't let the next shell prompt overwrite this message.

This addresses https://savannah.gnu.org/bugs/?53779.

Diffstat:
Msrc/nano.c | 3++-
Msrc/winio.c | 1+
2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/nano.c b/src/nano.c @@ -1107,7 +1107,7 @@ bool scoop_stdin(void) endwin(); tcsetattr(0, TCSANOW, &oldterm); - fprintf(stderr, _("Reading from stdin, ^C to abort\n")); + fprintf(stderr, _("Reading from standard input; type ^D or ^D^D to finish.\n")); #ifndef NANO_TINY /* Enable interpretation of the special control keys so that @@ -1142,6 +1142,7 @@ bool scoop_stdin(void) open_buffer("", TRUE); read_file(stream, 0, "stdin", TRUE); openfile->edittop = openfile->fileage; + fprintf(stderr, ".\n"); /* Reconnect the tty as the input source. */ thetty = open("/dev/tty", O_RDONLY); diff --git a/src/winio.c b/src/winio.c @@ -2159,6 +2159,7 @@ void statusline(message_type importance, const char *msg, ...) /* Curses mode is turned off. If we use wmove() now, it will muck * up the terminal settings. So we just use vfprintf(). */ if (isendwin()) { + fprintf(stderr, "\n"); vfprintf(stderr, msg, ap); va_end(ap); return;