diff --git a/src/help.c b/src/help.c index 0407a80a8161fc676fac8312b05390eea76250cd..b95fe5597cc8a101113aa8698f769417c25e17af 100644 --- a/src/help.c +++ b/src/help.c @@ -142,7 +142,6 @@ void do_help(void) UNSET(WHITESPACE_DISPLAY); UNSET(NOREAD_MODE); - SET(MULTIBUFFER); #ifdef ENABLE_LINENUMBERS UNSET(LINE_NUMBERS); diff --git a/src/nano.c b/src/nano.c index 93a99b8ad6b687cbdf658aced428a9113d622a7a..9db58f070e8defcd9f9f1b4e64579c6acc5b1f55 100644 --- a/src/nano.c +++ b/src/nano.c @@ -42,6 +42,12 @@ #include <sys/vt.h> #endif +#ifdef ENABLE_MULTIBUFFER +#define read_them_all TRUE +#else +#define read_them_all FALSE +#endif + #ifdef ENABLE_MOUSE static int oldinterval = -1; /* Used to store the user's original mouse click interval. */ @@ -1942,11 +1948,6 @@ int main(int argc, char **argv) #ifdef ENABLE_WRAPPING bool forced_wrapping = FALSE; /* Should long lines be automatically hard wrapped? */ -#endif -#ifdef ENABLE_MULTIBUFFER - bool is_multibuffer; - /* The actual value of the multibuffer option, restored after - * we've loaded all files given on the command line. */ #endif const struct option long_options[] = { {"boldtext", 0, NULL, 'D'}, @@ -2595,13 +2596,8 @@ int main(int argc, char **argv) fprintf(stderr, "Main: open file\n"); #endif -#ifdef ENABLE_MULTIBUFFER - is_multibuffer = ISSET(MULTIBUFFER); - SET(MULTIBUFFER); -#endif - /* Read the files mentioned on the command line into new buffers. */ - while (optind < argc && (!openfile || ISSET(MULTIBUFFER))) { + while (optind < argc && (!openfile || read_them_all)) { ssize_t givenline = 0, givencol = 0; /* If there's a +LINE[,COLUMN] argument here, eat it up. */ @@ -2642,9 +2638,6 @@ int main(int argc, char **argv) #ifdef ENABLE_MULTIBUFFER else openfile = openfile->next; - - if (!is_multibuffer) - UNSET(MULTIBUFFER); #endif #ifdef DEBUG diff --git a/src/text.c b/src/text.c index d558225bd49e5fcd4924c5d1b0668554907d1b06..8e3843d320682ebd3271845b39701b12ea6c3ed4 100644 --- a/src/text.c +++ b/src/text.c @@ -3225,7 +3225,6 @@ void do_linter(void) statusbar(_("Cancelled")); goto free_lints_and_return; } else if (i == 1) { - SET(MULTIBUFFER); open_buffer(curlint->filename, TRUE); } else { char *dontwantfile = mallocstrcpy(NULL, curlint->filename);