diff --git a/src/nano.c b/src/nano.c index 206f54ed..390cd77b 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1607,8 +1607,8 @@ void process_a_keystroke(void) } } - /* If we have a command, or if there aren't any other key codes waiting, - * it's time to insert the gathered bytes into the edit buffer. */ + /* If there are gathered bytes and we have a command or no other key codes + * are waiting, it's time to insert these bytes into the edit buffer. */ if (depth > 0 && (function || waiting_keycodes() == 0)) { puddle[depth] = '\0'; inject(puddle, depth); diff --git a/src/prompt.c b/src/prompt.c index df697f2b..de085248 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -281,9 +281,8 @@ void absorb_character(int input, functionptrtype function) } } - /* If we got a shortcut, or if there aren't any other keystrokes waiting, - * it's time to insert all characters in the input buffer (if not empty) - * into the answer, and then clear the input buffer. */ + /* If there are gathered bytes and we have a command or no other key codes + * are waiting, it's time to insert these bytes into the answer. */ if (depth > 0 && (function || waiting_keycodes() == 0)) { puddle[depth] = '\0'; inject_into_answer(puddle, depth); diff --git a/src/prototypes.h b/src/prototypes.h index 771a436d..d638a01a 100644 --- a/src/prototypes.h +++ b/src/prototypes.h @@ -579,8 +579,10 @@ linestruct *line_from_number(ssize_t number); #endif /* Most functions in winio.c. */ +#ifndef NANO_TINY void record_macro(void); void run_macro(void); +#endif void reserve_space_for(size_t newsize); size_t waiting_keycodes(void); #ifdef ENABLE_NANORC diff --git a/src/winio.c b/src/winio.c index 018c4d07..644e79fd 100644 --- a/src/winio.c +++ b/src/winio.c @@ -62,9 +62,9 @@ static bool linger_after_escape = FALSE; /* Whether to give ncurses some time to get the next code. */ static int statusblank = 0; /* The number of keystrokes left before we blank the status bar. */ -size_t from_x = 0; +static size_t from_x = 0; /* From where in the relevant line the current row is drawn. */ -size_t till_x = 0; +static size_t till_x = 0; /* Until where in the relevant line the current row is drawn. */ static bool has_more = FALSE; /* Whether the current line has more text after the displayed part. */