From 4ae808255227b59576f07ae46880db07204234a7 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 7 Apr 2024 11:19:06 +0200 Subject: [PATCH] files: do not allow M-U to remove text read from standard input This fixes https://savannah.gnu.org/bugs/?65565. Problem existed since version 2.1.8, commit 25d459aa, since reading from standard input was introduced. --- src/nano.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nano.c b/src/nano.c index dc2def85..90b4a0b5 100644 --- a/src/nano.c +++ b/src/nano.c @@ -872,9 +872,9 @@ bool scoop_stdin(void) /* Set up a signal handler so that ^C will stop the reading. */ install_handler_for_Ctrl_C(); - /* Read the input into a new buffer. */ + /* Read the input into a new buffer, undoably. */ make_new_buffer(); - read_file(stream, 0, "stdin", TRUE); + read_file(stream, 0, "stdin", FALSE); #ifdef ENABLE_COLOR find_and_prime_applicable_syntax(); #endif