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)
a119812437
This commit is contained in:
Sean Dewar
2022-01-29 16:34:00 +00:00
parent f8f0f14db2
commit 796224028b
4 changed files with 64 additions and 17 deletions

View File

@@ -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