nano

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

commit 8835c0d486a72dd95c8b27f085ae389191bee9ed
parent 0442eef95b2855c07545c02fcd5cb4661a9ee657
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Mon, 27 Jan 2020 13:36:28 +0100

tweaks: reduce the scope of a variable, and reshuffle a declaration

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

diff --git a/src/global.c b/src/global.c @@ -75,8 +75,6 @@ bool more_than_one = FALSE; bool also_the_last = FALSE; /* Whether indenting/commenting should include the last line of * the marked region. */ -bool is_shorter; - /* Whether a row's text is narrower than the screen's width. */ int didfind = 0; /* Whether the last search found something. */ diff --git a/src/proto.h b/src/proto.h @@ -55,8 +55,6 @@ extern bool more_than_one; extern bool also_the_last; -extern bool is_shorter; - extern int didfind; extern int controlleft, controlright; diff --git a/src/winio.c b/src/winio.c @@ -47,6 +47,8 @@ static int digit_count = 0; /* How many digits of a three-digit character code we've eaten. */ static bool waiting_mode = TRUE; /* Whether getting a character will wait for a key to be pressed. */ +static bool reveal_cursor = FALSE; + /* Whether the cursor should be shown when waiting for input. */ static int statusblank = 0; /* The number of keystrokes left before we blank the status bar. */ #ifdef USING_OLD_NCURSES @@ -55,8 +57,8 @@ static bool seen_wide = FALSE; #endif static bool has_more = FALSE; /* Whether the current line has more text after the displayed part. */ -static bool reveal_cursor = FALSE; - /* Whether the cursor should be shown when waiting for input. */ +static bool is_shorter = TRUE; + /* Whether a row's text is narrower than the screen's width. */ #ifndef NANO_TINY static bool recording = FALSE; /* Whether we are in the process of recording a macro. */