mirror of
git://git.sv.gnu.org/nano.git
synced 2024-11-25 14:20:46 +03:00
tweaks: rename a function, to not contain the name of a variable
This commit is contained in:
parent
bdf64d660b
commit
f261a8aca5
@ -1583,7 +1583,7 @@ 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 ((shortcut || get_key_buffer_len() == 0) && puddle != NULL) {
|
||||
if ((shortcut || waiting_keycodes() == 0) && puddle != NULL) {
|
||||
puddle[depth] = '\0';
|
||||
|
||||
inject(puddle, depth);
|
||||
@ -2545,7 +2545,7 @@ int main(int argc, char **argv)
|
||||
confirm_margin();
|
||||
#endif
|
||||
#ifdef __linux__
|
||||
if (on_a_vt && get_key_buffer_len() == 0)
|
||||
if (on_a_vt && waiting_keycodes() == 0)
|
||||
mute_modifiers = FALSE;
|
||||
#endif
|
||||
if (currmenu != MMAIN)
|
||||
@ -2559,7 +2559,7 @@ int main(int argc, char **argv)
|
||||
/* Update the displayed current cursor position only when there
|
||||
* is no message and no keys are waiting in the input buffer. */
|
||||
if (ISSET(CONSTANT_SHOW) && lastmessage == VACUUM && LINES > 1 &&
|
||||
!ISSET(ZERO) && get_key_buffer_len() == 0)
|
||||
!ISSET(ZERO) && waiting_keycodes() == 0)
|
||||
report_cursor_position();
|
||||
|
||||
as_an_at = TRUE;
|
||||
|
@ -290,7 +290,7 @@ int do_statusbar_input(bool *finished)
|
||||
/* 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 ((shortcut || get_key_buffer_len() == 0) && puddle != NULL) {
|
||||
if ((shortcut || waiting_keycodes() == 0) && puddle != NULL) {
|
||||
puddle[depth] = '\0';
|
||||
|
||||
inject_into_answer(puddle, depth);
|
||||
@ -717,7 +717,7 @@ int ask_user(bool withall, const char *question)
|
||||
if (using_utf8() && 0xC0 <= kbinput && kbinput <= 0xF7) {
|
||||
int extras = (kbinput / 16) % 4 + (kbinput <= 0xCF ? 1 : 0);
|
||||
|
||||
while (extras <= get_key_buffer_len() && extras-- > 0)
|
||||
while (extras <= waiting_keycodes() && extras-- > 0)
|
||||
letter[index++] = (unsigned char)get_kbinput(bottomwin, !withall);
|
||||
}
|
||||
#endif
|
||||
|
@ -568,7 +568,7 @@ linestruct *line_from_number(ssize_t number);
|
||||
/* Most functions in winio.c. */
|
||||
void record_macro(void);
|
||||
void run_macro(void);
|
||||
size_t get_key_buffer_len(void);
|
||||
size_t waiting_keycodes(void);
|
||||
#ifdef ENABLE_NANORC
|
||||
void implant(const char *string);
|
||||
#endif
|
||||
|
@ -295,7 +295,7 @@ void read_keys_from(WINDOW *win)
|
||||
}
|
||||
|
||||
/* Return the number of key codes waiting in the keystroke buffer. */
|
||||
size_t get_key_buffer_len(void)
|
||||
size_t waiting_keycodes(void)
|
||||
{
|
||||
return waiting_codes;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user