diff options
author | Sean Dewar <seandewar@users.noreply.github.com> | 2022-01-29 16:34:00 +0000 |
---|---|---|
committer | Sean Dewar <seandewar@users.noreply.github.com> | 2022-01-30 22:25:15 +0000 |
commit | 796224028bb8f67d91913f953edfe0693f444de9 (patch) | |
tree | 4d1653c0fd39d0a52e44117ea7b87b19913a14dd /src/nvim/ex_getln.c | |
parent | f8f0f14db2e8096e77ed60171d360ac2605b7c80 (diff) | |
download | rneovim-796224028bb8f67d91913f953edfe0693f444de9.tar.gz rneovim-796224028bb8f67d91913f953edfe0693f444de9.tar.bz2 rneovim-796224028bb8f67d91913f953edfe0693f444de9.zip |
vim-patch:8.2.3629: command completion in cmdline window uses global commands
Problem: Command completion in cmdline window uses global user commands,
not local commands for the window where it was opened from.
Solution: Use local commands. (closes vim/vim#9168)
https://github.com/vim/vim/commit/a1198124370a366ff02811a43845a631b5c6e7f0
Diffstat (limited to 'src/nvim/ex_getln.c')
-rw-r--r-- | src/nvim/ex_getln.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index fd75cfc7f8..3bb5d37212 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -6587,6 +6587,13 @@ static int open_cmdwin(void) return cmdwin_result; } +/// @return true if in the cmdwin, not editing the command line. +bool is_in_cmdwin(void) + FUNC_ATTR_PURE +{ + return cmdwin_type != 0 && get_cmdline_type() == NUL; +} + /// Get script string /// /// Used for commands which accept either `:command script` or |