tweaks: elide another variable, to call a function less often
Instead of always calling sctofunc(), it is now only called when in view mode OR when (after the keystroke's function has been run) no need for a refresh has been established yet.
Этот коммит содержится в:
родитель
53a10ddcaf
Коммит
54103d8ed1
@ -1708,9 +1708,7 @@ int do_input(bool allow_funcs)
|
|||||||
if (shortcut == NULL)
|
if (shortcut == NULL)
|
||||||
pletion_line = NULL;
|
pletion_line = NULL;
|
||||||
else {
|
else {
|
||||||
const subnfunc *f = sctofunc(shortcut);
|
if (ISSET(VIEW_MODE) && !sctofunc(shortcut)->viewok) {
|
||||||
|
|
||||||
if (ISSET(VIEW_MODE) && f && !f->viewok) {
|
|
||||||
print_view_warning();
|
print_view_warning();
|
||||||
return ERR;
|
return ERR;
|
||||||
}
|
}
|
||||||
@ -1776,7 +1774,7 @@ int do_input(bool allow_funcs)
|
|||||||
wrap_reset();
|
wrap_reset();
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_COLOR
|
#ifdef ENABLE_COLOR
|
||||||
if (f && !f->viewok && !refresh_needed)
|
if (!refresh_needed && !sctofunc(shortcut)->viewok)
|
||||||
check_the_multis(openfile->current);
|
check_the_multis(openfile->current);
|
||||||
#endif
|
#endif
|
||||||
if (!refresh_needed && (shortcut->func == do_delete ||
|
if (!refresh_needed && (shortcut->func == do_delete ||
|
||||||
|
Загрузка…
Ссылка в новой задаче
Block a user