tweaks: remove a superfluous global variable

There were no calls of statusbar() or statusline() before curses mode
was entered.  But since the previous commit curses mode is entered
even earlier, so...
master
Benno Schulenberg 2020-06-14 13:03:57 +02:00
parent 24cdf78a93
commit d67faa2bb5
4 changed files with 1 additions and 6 deletions

View File

@ -45,8 +45,6 @@ bool mute_modifiers = FALSE;
bool bracketed_paste = FALSE;
/* Whether text is being pasted into nano from outside. */
bool started_curses = FALSE;
/* Becomes TRUE when curses mode has been entered the first time. */
bool we_are_running = FALSE;
/* Becomes TRUE as soon as all options and files have been read. */
bool more_than_one = FALSE;

View File

@ -2045,8 +2045,6 @@ int main(int argc, char **argv)
if (initscr() == NULL)
exit(1);
started_curses = TRUE;
#ifdef ENABLE_COLOR
/* If the terminal can do colors, tell ncurses to switch them on. */
if (has_colors())

View File

@ -34,7 +34,6 @@ extern bool shift_held;
extern bool mute_modifiers;
extern bool bracketed_paste;
extern bool started_curses;
extern bool we_are_running;
extern bool more_than_one;

View File

@ -2150,7 +2150,7 @@ void statusline(message_type importance, const char *msg, ...)
#ifndef NANO_TINY
/* Curses mode shouldn't be off when trying to write to the status bar. */
if (!started_curses || isendwin()) {
if (isendwin()) {
fprintf(stderr, "Out of curses -- please report a bug\n");
lastmessage = HUSH;
napms(1400);