commit 61dc2cab0b598a508ef17d8c880380058242ec9c
parent a2313f499cbef7a6fa24a97e59413bb60c7692d2
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Wed, 12 Feb 2020 16:20:20 +0100
tweaks: rename two variables, and frob four comments
Diffstat:
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/src/nano.c b/src/nano.c
@@ -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';
diff --git a/src/prompt.c b/src/prompt.c
@@ -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);
}
diff --git a/src/text.c b/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);
}