summaryrefslogtreecommitdiffstats
path: root/src/ex_getln.c
diff options
context:
space:
mode:
authormityu <mityu.mail@gmail.com>2021-11-20 19:13:39 +0000
committerBram Moolenaar <Bram@vim.org>2021-11-20 19:13:39 +0000
commita1198124370a366ff02811a43845a631b5c6e7f0 (patch)
tree7d1ef0b5d8dc8de7a8c9b85d8f5b59ef530dce9c /src/ex_getln.c
parent87fd0924e2d85213cc111ee7a5122f92216a37c7 (diff)
patch 8.2.3629: command completion in cmdline window uses global commandsv8.2.3629
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)
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r--src/ex_getln.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index 258548ed8a..2616afc42a 100644
--- 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
/*