tweaks: rename two variables, and frob four comments
parent
a2313f499c
commit
61dc2cab0b
|
@ -1544,7 +1544,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 current buffer. */
|
||||
* it's time to insert the gathered bytes into the edit buffer. */
|
||||
if ((shortcut || get_key_buffer_len() == 0) && puddle != NULL) {
|
||||
puddle[depth] = '\0';
|
||||
|
||||
|
|
|
@ -313,15 +313,15 @@ void do_statusbar_prev_word(void)
|
|||
}
|
||||
#endif /* !NANO_TINY */
|
||||
|
||||
/* Get verbatim input and inject it into the answer, without filtering. */
|
||||
/* Get a verbatim keystroke and insert it into the answer. */
|
||||
void do_statusbar_verbatim_input(void)
|
||||
{
|
||||
int *kbinput;
|
||||
size_t kbinput_len;
|
||||
size_t count;
|
||||
|
||||
kbinput = get_verbatim_kbinput(bottomwin, &kbinput_len);
|
||||
kbinput = get_verbatim_kbinput(bottomwin, &count);
|
||||
|
||||
inject_into_answer(kbinput, kbinput_len);
|
||||
inject_into_answer(kbinput, count);
|
||||
|
||||
free(kbinput);
|
||||
}
|
||||
|
|
16
src/text.c
16
src/text.c
|
@ -3133,14 +3133,14 @@ void do_verbatim_input(void)
|
|||
{
|
||||
int *kbinput;
|
||||
size_t count;
|
||||
char *keycodes;
|
||||
char *bytes;
|
||||
|
||||
/* TRANSLATORS: This is displayed when the next keystroke will be
|
||||
* inserted verbatim. */
|
||||
statusbar(_("Verbatim Input"));
|
||||
place_the_cursor();
|
||||
|
||||
/* Read in all the verbatim characters. */
|
||||
/* Read in the first one or two bytes of the next keystroke. */
|
||||
kbinput = get_verbatim_kbinput(edit, &count);
|
||||
|
||||
/* Unsuppress cursor-position display or blank the status bar. */
|
||||
|
@ -3149,16 +3149,16 @@ void do_verbatim_input(void)
|
|||
else
|
||||
wipe_statusbar();
|
||||
|
||||
keycodes = charalloc(count + 1);
|
||||
bytes = charalloc(count + 1);
|
||||
|
||||
for (size_t i = 0; i < count; i++)
|
||||
keycodes[i] = (char)kbinput[i];
|
||||
keycodes[count] = '\0';
|
||||
bytes[i] = (char)kbinput[i];
|
||||
bytes[count] = '\0';
|
||||
|
||||
/* Insert the keystroke verbatim. */
|
||||
inject(keycodes, count);
|
||||
/* Insert the bytes into the edit buffer. */
|
||||
inject(bytes, count);
|
||||
|
||||
free(keycodes);
|
||||
free(bytes);
|
||||
free(kbinput);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue