patch 9.1.1338: Calling expand() interferes with cmdcomplete_info()
Problem: Calling expand() interferes with cmdcomplete_info()
(after 9.1.1329).
Solution: Only clear cmdline_orig when starting/ending cmdline mode
(zeertzjq).
closes: #17192
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/cmdexpand.c b/src/cmdexpand.c
index e8bc080..4dbd10e 100644
--- a/src/cmdexpand.c
+++ b/src/cmdexpand.c
@@ -1115,7 +1115,6 @@
xp->xp_backslash = XP_BS_NONE;
xp->xp_prefix = XP_PREFIX_NONE;
xp->xp_numfiles = -1;
- VIM_CLEAR(cmdline_orig);
}
/*
@@ -1132,6 +1131,12 @@
VIM_CLEAR(xp->xp_orig);
}
+ void
+clear_cmdline_orig(void)
+{
+ VIM_CLEAR(cmdline_orig);
+}
+
/*
* Display one line of completion matches. Multiple matches are displayed in
* each line (used by wildmode=list and CTRL-D)