aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/globals.h
diff options
context:
space:
mode:
authorSean Dewar <seandewar@users.noreply.github.com>2023-07-27 01:38:23 +0100
committerSean Dewar <seandewar@users.noreply.github.com>2024-01-28 12:29:26 +0000
commitcf140fb25b94c556396fe942a4af3e8db9effa37 (patch)
treead454e6616d049d60b18d11929c16bfb0af52003 /src/nvim/globals.h
parent2cd76a758b4511748d9482e5af58162a608516b4 (diff)
downloadrneovim-cf140fb25b94c556396fe942a4af3e8db9effa37.tar.gz
rneovim-cf140fb25b94c556396fe942a4af3e8db9effa37.tar.bz2
rneovim-cf140fb25b94c556396fe942a4af3e8db9effa37.zip
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. https://github.com/vim/vim/commit/988f74311c26ea9917e84fbae608de226dba7e5f
Diffstat (limited to 'src/nvim/globals.h')
-rw-r--r--src/nvim/globals.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nvim/globals.h b/src/nvim/globals.h
index f0cc9dba74..a06e9fe542 100644
--- a/src/nvim/globals.h
+++ b/src/nvim/globals.h
@@ -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--"));