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>
This commit is contained in:
zeertzjq
2025-04-23 20:50:23 +02:00
committed by Christian Brabandt
parent 1343681aba
commit ec270a5f55
5 changed files with 14 additions and 2 deletions

View File

@ -1115,7 +1115,6 @@ ExpandInit(expand_T *xp)
xp->xp_backslash = XP_BS_NONE;
xp->xp_prefix = XP_PREFIX_NONE;
xp->xp_numfiles = -1;
VIM_CLEAR(cmdline_orig);
}
/*
@ -1132,6 +1131,12 @@ ExpandCleanup(expand_T *xp)
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)