From 997826d79403d33287ee97ddcac7c6693b5e2d29 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Fri, 28 Dec 2018 17:47:03 +0100 Subject: [PATCH] tweaks: rename a symbol, to match its corresponding option --- src/nano.c | 8 ++++---- src/nano.h | 2 +- src/rcfile.c | 2 +- src/winio.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/nano.c b/src/nano.c index 320fc014..c9e71032 100644 --- a/src/nano.c +++ b/src/nano.c @@ -706,8 +706,8 @@ void window_init(void) /* In case the terminal shrunk, make sure the status line is clear. */ wipe_statusbar(); - /* Turn the keypad on for the windows, if necessary. */ - if (!ISSET(REBIND_KEYPAD)) { + /* When not disabled, turn escape-sequence translation on. */ + if (!ISSET(RAW_SEQUENCES)) { keypad(topwin, TRUE); keypad(edit, TRUE); keypad(bottomwin, TRUE); @@ -1528,7 +1528,7 @@ int get_keycode(const char *keyname, const int standard) return key_defined(keyvalue); #endif #ifdef DEBUG - if (!ISSET(REBIND_KEYPAD)) + if (!ISSET(RAW_SEQUENCES)) fprintf(stderr, "Using fallback keycode for %s\n", keyname); #endif return standard; @@ -2131,7 +2131,7 @@ int main(int argc, char **argv) break; #endif case 'K': - SET(REBIND_KEYPAD); + SET(RAW_SEQUENCES); break; case 'L': SET(NO_NEWLINES); diff --git a/src/nano.h b/src/nano.h index 01854053..2a37261b 100644 --- a/src/nano.h +++ b/src/nano.h @@ -513,7 +513,7 @@ enum MULTIBUFFER, SMOOTH_SCROLL, REBIND_DELETE, - REBIND_KEYPAD, + RAW_SEQUENCES, NO_CONVERT, BACKUP_FILE, INSECURE_BACKUP, diff --git a/src/rcfile.c b/src/rcfile.c index 5c2f1fb9..f588b7a3 100644 --- a/src/rcfile.c +++ b/src/rcfile.c @@ -78,7 +78,7 @@ static const rcoption rcopts[] = { #endif {"quickblank", QUICK_BLANK}, {"rebinddelete", REBIND_DELETE}, - {"rebindkeypad", REBIND_KEYPAD}, + {"rebindkeypad", RAW_SEQUENCES}, {"regexp", USE_REGEXP}, #ifdef ENABLE_SPELLER {"speller", 0}, diff --git a/src/winio.c b/src/winio.c index 63e8a2ec..ad48a861 100644 --- a/src/winio.c +++ b/src/winio.c @@ -1538,7 +1538,7 @@ int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len) * don't get extended keypad values. */ if (ISSET(PRESERVE)) disable_flow_control(); - if (!ISSET(REBIND_KEYPAD)) + if (!ISSET(RAW_SEQUENCES)) keypad(win, FALSE); /* Read in one keycode, or one or two escapes. */ @@ -1557,7 +1557,7 @@ int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len) enable_flow_control(); /* Use the global window pointers, because a resize may have freed * the data that the win parameter points to. */ - if (!ISSET(REBIND_KEYPAD)) { + if (!ISSET(RAW_SEQUENCES)) { keypad(edit, TRUE); keypad(bottomwin, TRUE); }