vim-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: vim/vim#17192

ec270a5f55
This commit is contained in:
zeertzjq
2025-04-24 06:45:49 +08:00
parent 07d60e8f19
commit 3d126ec89f
3 changed files with 10 additions and 2 deletions

View File

@@ -970,7 +970,6 @@ void ExpandInit(expand_T *xp)
xp->xp_backslash = XP_BS_NONE;
xp->xp_prefix = XP_PREFIX_NONE;
xp->xp_numfiles = -1;
XFREE_CLEAR(cmdline_orig);
}
/// Cleanup an expand structure after use.
@@ -983,6 +982,11 @@ void ExpandCleanup(expand_T *xp)
XFREE_CLEAR(xp->xp_orig);
}
void clear_cmdline_orig(void)
{
XFREE_CLEAR(cmdline_orig);
}
/// Display one line of completion matches. Multiple matches are displayed in
/// each line (used by wildmode=list and CTRL-D)
///