diff src/ex_getln.c @ 26195:41b3718d84c3 v8.2.3629

patch 8.2.3629: command completion in cmdline window uses global commands Commit: https://github.com/vim/vim/commit/a1198124370a366ff02811a43845a631b5c6e7f0 Author: mityu <mityu.mail@gmail.com> Date: Sat Nov 20 19:13:39 2021 +0000 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 #9168)
author Bram Moolenaar <Bram@vim.org>
date Sat, 20 Nov 2021 20:15:03 +0100
parents e8873138ffbb
children d413104a94c8
line wrap: on
line diff
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -4485,6 +4485,15 @@ open_cmdwin(void)
 
     return cmdwin_result;
 }
+
+/*
+ * Return TRUE if in the cmdwin, not editing the command line.
+ */
+    int
+is_in_cmdwin(void)
+{
+    return cmdwin_type != 0 && get_cmdline_type() == NUL;
+}
 #endif // FEAT_CMDWIN
 
 /*