vim-patch:9.0.1956: Custom completion skips orig cmdline if it invokes glob() (#25427)

Problem:  Custom cmdline completion skips original cmdline when pressing
          Ctrl-P at first match if completion function invokes glob().
Solution: Move orig_save into struct expand_T.

closes: vim/vim#13216

28a23602e8
This commit is contained in:
zeertzjq
2023-09-30 06:30:10 +08:00
committed by GitHub
parent be463e7643
commit dbfdb52ea8
3 changed files with 31 additions and 14 deletions

View File

@@ -245,6 +245,7 @@ struct expand {
int xp_numfiles; // number of files found by file name completion
int xp_col; // cursor position in line
int xp_selected; // selected index in completion
char *xp_orig; // originally expanded string
char **xp_files; // list of files
char *xp_line; // text being completed
#define EXPAND_BUF_LEN 256