From 3409cb2b77ccc620c4691e9aa4650f3b4920d15f Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 10 Nov 2021 16:18:01 +0100 Subject: [PATCH] files: allow inserting also when started with the --noread option The --noread option should apply only to the files listed on the command line, but once nano has started, it should be possible to insert other files into the current buffer or into a new buffer. This fixes https://savannah.gnu.org/bugs/?61458. Bug existed since version 2.3.3, since --noread was introduced. --- src/nano.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/nano.c b/src/nano.c index 9ff64e7c..e5a98121 100644 --- a/src/nano.c +++ b/src/nano.c @@ -2476,6 +2476,9 @@ int main(int argc, char **argv) #endif } + /* After handling the files on the command line, allow inserting files. */ + UNSET(NOREAD_MODE); + /* If no filenames were given, or all of them were invalid things like * directories, then open a blank buffer and allow editing. Otherwise, * switch from the last opened file to the next, that is: the first. */