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.master
parent
f1530c7ba0
commit
0da554e6d7
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue