mirror of
https://github.com/neovim/neovim.git
synced 2025-10-05 09:26:30 +00:00
vim-patch:9.1.0047: issues with temp curwin/buf while cmdwin is open
Problem: Things that temporarily change/restore curwin/buf (e.g:
win_execute, some autocmds) may break assumptions that
curwin/buf is the cmdwin when "cmdwin_type != 0", causing
issues.
Solution: Expose the cmdwin's real win/buf and check that instead. Also
try to ensure these variables are NULL if "cmdwin_type == 0",
allowing them to be used directly in most cases without
checking cmdwin_type. (Sean Dewar)
Reset and save `cmdwin_old_curwin` in a similar fashion.
Apply suitable changes for API functions and add Lua tests.
988f74311c
This commit is contained in:
@@ -752,6 +752,8 @@ EXTERN bool km_startsel INIT( = false);
|
||||
EXTERN int cmdwin_type INIT( = 0); ///< type of cmdline window or 0
|
||||
EXTERN int cmdwin_result INIT( = 0); ///< result of cmdline window or 0
|
||||
EXTERN int cmdwin_level INIT( = 0); ///< cmdline recursion level
|
||||
EXTERN buf_T *cmdwin_buf INIT( = NULL); ///< buffer of cmdline window or NULL
|
||||
EXTERN win_T *cmdwin_win INIT( = NULL); ///< window of cmdline window or NULL
|
||||
EXTERN win_T *cmdwin_old_curwin INIT( = NULL); ///< curwin before opening cmdline window or NULL
|
||||
|
||||
EXTERN char no_lines_msg[] INIT( = N_("--No lines in buffer--"));
|
||||
|
Reference in New Issue
Block a user