mirror of
https://github.com/neovim/neovim.git
synced 2025-10-09 19:36:40 +00:00
vim-patch:8.2.4391: command line executed when typing Esc in the GUI
Problem: Command line executed when typing Esc in the GUI.
Solution: Move saving/restoring KeyTyped to build_stl_str_hl().
(closes vim/vim#9783)
0e1f36fc59
Co-authored-by: Bram Moolenaar <Bram@vim.org>
This commit is contained in:
@@ -268,7 +268,6 @@ static void win_redr_custom(win_T *wp, bool draw_winbar, bool draw_ruler)
|
|||||||
StlClickRecord *tabtab;
|
StlClickRecord *tabtab;
|
||||||
win_T *ewp;
|
win_T *ewp;
|
||||||
int p_crb_save;
|
int p_crb_save;
|
||||||
bool save_KeyTyped = KeyTyped;
|
|
||||||
bool is_stl_global = global_stl_height() > 0;
|
bool is_stl_global = global_stl_height() > 0;
|
||||||
|
|
||||||
ScreenGrid *grid = &default_grid;
|
ScreenGrid *grid = &default_grid;
|
||||||
@@ -423,9 +422,6 @@ static void win_redr_custom(win_T *wp, bool draw_winbar, bool draw_ruler)
|
|||||||
|
|
||||||
theend:
|
theend:
|
||||||
entered = false;
|
entered = false;
|
||||||
|
|
||||||
// A user function may reset KeyTyped, restore it.
|
|
||||||
KeyTyped = save_KeyTyped;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void win_redr_winbar(win_T *wp)
|
void win_redr_winbar(win_T *wp)
|
||||||
@@ -948,6 +944,7 @@ int build_stl_str_hl(win_T *wp, char *out, size_t outlen, char *fmt, char *opt_n
|
|||||||
char *usefmt = fmt;
|
char *usefmt = fmt;
|
||||||
const int save_must_redraw = must_redraw;
|
const int save_must_redraw = must_redraw;
|
||||||
const int save_redr_type = curwin->w_redr_type;
|
const int save_redr_type = curwin->w_redr_type;
|
||||||
|
const bool save_KeyTyped = KeyTyped;
|
||||||
// TODO(Bram): find out why using called_emsg_before makes tests fail, does it
|
// TODO(Bram): find out why using called_emsg_before makes tests fail, does it
|
||||||
// matter?
|
// matter?
|
||||||
// const int called_emsg_before = called_emsg;
|
// const int called_emsg_before = called_emsg;
|
||||||
@@ -2153,5 +2150,8 @@ int build_stl_str_hl(win_T *wp, char *out, size_t outlen, char *fmt, char *opt_n
|
|||||||
set_string_option_direct(opt_name, -1, "", OPT_FREE | opt_scope, SID_ERROR);
|
set_string_option_direct(opt_name, -1, "", OPT_FREE | opt_scope, SID_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A user function may reset KeyTyped, restore it.
|
||||||
|
KeyTyped = save_KeyTyped;
|
||||||
|
|
||||||
return width;
|
return width;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user