nano

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

commit db10a421dcc5df2cabd813c6d81ed85d3c8fec52
parent 57253361496d8d661239285df0882888eb67dd0d
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Sun, 26 Jan 2020 15:41:09 +0100

tweaks: move a function to after the one that it calls

Diffstat:
Msrc/proto.h | 2+-
Msrc/winio.c | 36++++++++++++++++++------------------
2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/src/proto.h b/src/proto.h @@ -614,9 +614,9 @@ size_t get_key_buffer_len(void); #ifdef ENABLE_NANORC void implant(const char *string); #endif -int get_kbinput(WINDOW *win, bool showcursor); int parse_kbinput(WINDOW *win); int parse_escape_sequence(WINDOW *win, int kbinput); +int get_kbinput(WINDOW *win, bool showcursor); int get_byte_kbinput(int kbinput); int get_control_kbinput(int kbinput); int *get_verbatim_kbinput(WINDOW *win, size_t *kbinput_len); diff --git a/src/winio.c b/src/winio.c @@ -321,24 +321,6 @@ int *get_input(WINDOW *win, size_t input_len) return input; } -/* Read in a single keystroke, ignoring any that are invalid. */ -int get_kbinput(WINDOW *win, bool showcursor) -{ - int kbinput = ERR; - - reveal_cursor = showcursor; - - /* Extract one keystroke from the input stream. */ - while (kbinput == ERR) - kbinput = parse_kbinput(win); - - /* If we read from the edit window, blank the status bar if needed. */ - if (win == edit) - check_statusblank(); - - return kbinput; -} - /* Extract a single keystroke from the input stream. Translate escape * sequences and extended keypad codes into their corresponding values. * Set meta_key to TRUE when appropriate. Supported extended keypad values @@ -1334,6 +1316,24 @@ int parse_escape_sequence(WINDOW *win, int kbinput) return retval; } +/* Read in a single keystroke, ignoring any that are invalid. */ +int get_kbinput(WINDOW *win, bool showcursor) +{ + int kbinput = ERR; + + reveal_cursor = showcursor; + + /* Extract one keystroke from the input stream. */ + while (kbinput == ERR) + kbinput = parse_kbinput(win); + + /* If we read from the edit window, blank the status bar if needed. */ + if (win == edit) + check_statusblank(); + + return kbinput; +} + /* Turn a three-digit decimal number (from 000 to 255) into its corresponding * byte value. */ int get_byte_kbinput(int kbinput)