tweaks: correct one comment, and adjust another

master
Benno Schulenberg 2016-08-06 12:15:03 +02:00
parent 370406bb41
commit bd1fcc5fe2
1 changed files with 6 additions and 8 deletions

View File

@ -90,15 +90,13 @@ int do_statusbar_input(bool *ran_func, bool *finished,
} }
} }
/* If we got a character, and it isn't a shortcut or toggle, /* If the keystroke isn't a shortcut nor a toggle, it's a normal text
* it's a normal text character. Display the warning if we're * character: add the it to the input buffer, when allowed. */
* in view mode, or add the character to the input buffer if
* we're not. */
if (input != ERR && !have_shortcut) { if (input != ERR && !have_shortcut) {
/* If we're using restricted mode, the filename isn't blank, /* Only accept input when not in restricted mode, or when not at
* and we're at the "Write File" prompt, disable text input. */ * the "Write File" prompt, or when there is no filename yet. */
if (!ISSET(RESTRICTED) || openfile->filename[0] == '\0' || if (!ISSET(RESTRICTED) || currmenu != MWRITEFILE ||
currmenu != MWRITEFILE) { openfile->filename[0] == '\0') {
kbinput_len++; kbinput_len++;
kbinput = (int *)nrealloc(kbinput, kbinput_len * sizeof(int)); kbinput = (int *)nrealloc(kbinput, kbinput_len * sizeof(int));
kbinput[kbinput_len - 1] = input; kbinput[kbinput_len - 1] = input;