tweaks: remove unneeded settings and unsettings of MULTIBUFFER

In the preceding commit, open_buffer() was changed so that it gets
told whether to load into a new buffer or not, so it is no longer
needed to convey this information through a flag.
master
Benno Schulenberg 2018-03-21 11:40:15 +01:00
parent dd157f1494
commit f4d1ef1c4e
3 changed files with 7 additions and 16 deletions

View File

@ -142,7 +142,6 @@ void do_help(void)
UNSET(WHITESPACE_DISPLAY);
UNSET(NOREAD_MODE);
SET(MULTIBUFFER);
#ifdef ENABLE_LINENUMBERS
UNSET(LINE_NUMBERS);

View File

@ -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

View File

@ -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);