nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit d67faa2bb5c5dc7bcd057a063b04976f489c5a81
parent 24cdf78a93656e1ded587659271aca55181f9a6e
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 14 Jun 2020 13:03:57 +0200

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

Diffstat:
Msrc/global.c | 2--
Msrc/nano.c | 2--
Msrc/proto.h | 1-
Msrc/winio.c | 2+-
4 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/src/global.c b/src/global.c @@ -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; diff --git a/src/nano.c b/src/nano.c @@ -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()) diff --git a/src/proto.h b/src/proto.h @@ -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; diff --git a/src/winio.c b/src/winio.c @@ -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);