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,
|
/* 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. */
|
* 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';
|
puddle[depth] = '\0';
|
||||||
|
|
||||||
inject(puddle, depth);
|
inject(puddle, depth);
|
||||||
@ -2545,7 +2545,7 @@ int main(int argc, char **argv)
|
|||||||
confirm_margin();
|
confirm_margin();
|
||||||
#endif
|
#endif
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
if (on_a_vt && get_key_buffer_len() == 0)
|
if (on_a_vt && waiting_keycodes() == 0)
|
||||||
mute_modifiers = FALSE;
|
mute_modifiers = FALSE;
|
||||||
#endif
|
#endif
|
||||||
if (currmenu != MMAIN)
|
if (currmenu != MMAIN)
|
||||||
@ -2559,7 +2559,7 @@ int main(int argc, char **argv)
|
|||||||
/* Update the displayed current cursor position only when there
|
/* Update the displayed current cursor position only when there
|
||||||
* is no message and no keys are waiting in the input buffer. */
|
* is no message and no keys are waiting in the input buffer. */
|
||||||
if (ISSET(CONSTANT_SHOW) && lastmessage == VACUUM && LINES > 1 &&
|
if (ISSET(CONSTANT_SHOW) && lastmessage == VACUUM && LINES > 1 &&
|
||||||
!ISSET(ZERO) && get_key_buffer_len() == 0)
|
!ISSET(ZERO) && waiting_keycodes() == 0)
|
||||||
report_cursor_position();
|
report_cursor_position();
|
||||||
|
|
||||||
as_an_at = TRUE;
|
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,
|
/* 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)
|
* it's time to insert all characters in the input buffer (if not empty)
|
||||||
* into the answer, and then clear the input buffer. */
|
* 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';
|
puddle[depth] = '\0';
|
||||||
|
|
||||||
inject_into_answer(puddle, depth);
|
inject_into_answer(puddle, depth);
|
||||||
@ -717,7 +717,7 @@ int ask_user(bool withall, const char *question)
|
|||||||
if (using_utf8() && 0xC0 <= kbinput && kbinput <= 0xF7) {
|
if (using_utf8() && 0xC0 <= kbinput && kbinput <= 0xF7) {
|
||||||
int extras = (kbinput / 16) % 4 + (kbinput <= 0xCF ? 1 : 0);
|
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);
|
letter[index++] = (unsigned char)get_kbinput(bottomwin, !withall);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -568,7 +568,7 @@ linestruct *line_from_number(ssize_t number);
|
|||||||
/* Most functions in winio.c. */
|
/* Most functions in winio.c. */
|
||||||
void record_macro(void);
|
void record_macro(void);
|
||||||
void run_macro(void);
|
void run_macro(void);
|
||||||
size_t get_key_buffer_len(void);
|
size_t waiting_keycodes(void);
|
||||||
#ifdef ENABLE_NANORC
|
#ifdef ENABLE_NANORC
|
||||||
void implant(const char *string);
|
void implant(const char *string);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -295,7 +295,7 @@ void read_keys_from(WINDOW *win)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Return the number of key codes waiting in the keystroke buffer. */
|
/* 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;
|
return waiting_codes;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user