prompt: prevent execution of inadmissible functions in view mode
This fixes https://savannah.gnu.org/bugs/?62912. Bug existed since commit 958ec294 from earlier today, but was enabled by commit 433dd921 from three days ago.
Этот коммит содержится в:
родитель
8b4bf2bb8d
Коммит
5a3bd329d6
@ -367,9 +367,12 @@ int do_statusbar_input(bool *finished)
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
/* Handle some other shortcut, and indicate that we're done. */
|
||||
function();
|
||||
*finished = TRUE;
|
||||
/* Handle any other permissible shortcut, and stamp as done. */
|
||||
if (!ISSET(VIEW_MODE) || !changes_something(function)) {
|
||||
function();
|
||||
*finished = TRUE;
|
||||
} else
|
||||
beep();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -427,6 +427,7 @@ void terminal_init(void);
|
||||
void confirm_margin(void);
|
||||
#endif
|
||||
void unbound_key(int code);
|
||||
bool changes_something(const void *f);
|
||||
void inject(char *burst, size_t count);
|
||||
|
||||
/* Most functions in prompt.c. */
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user