diff options
author | zeertzjq <zeertzjq@outlook.com> | 2025-03-04 06:41:41 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-04 06:41:41 +0800 |
commit | e4fb697b69c7307a76d06cf60bb834af2e2cdc5e (patch) | |
tree | c3d4b89e4fddbd39a010cebb65440b6b33b8b93d /src/nvim/cmdexpand.c | |
parent | 948179cb19c75a9e79cdf2c86c441304c5285e81 (diff) | |
parent | e56f7413505c76b7b57ced2552479ad02875bc74 (diff) | |
download | rneovim-e4fb697b69c7307a76d06cf60bb834af2e2cdc5e.tar.gz rneovim-e4fb697b69c7307a76d06cf60bb834af2e2cdc5e.tar.bz2 rneovim-e4fb697b69c7307a76d06cf60bb834af2e2cdc5e.zip |
Merge pull request #32709 from deathbeam/vim-9.1.1166
vim-patch:9.1.{1166,1168}: 'wildmode' noselect
Diffstat (limited to 'src/nvim/cmdexpand.c')
-rw-r--r-- | src/nvim/cmdexpand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/cmdexpand.c b/src/nvim/cmdexpand.c index 33ccc834d2..fcfeda5482 100644 --- a/src/nvim/cmdexpand.c +++ b/src/nvim/cmdexpand.c @@ -288,7 +288,7 @@ int nextwild(expand_T *xp, int type, int options, bool escape) p1 = addstar(xp->xp_pattern, xp->xp_pattern_len, xp->xp_context); } // Translate string into pattern and expand it. - const int use_options = (options + const int use_options = ((options & ~WILD_KEEP_SOLE_ITEM) | WILD_HOME_REPLACE | WILD_ADD_SLASH | WILD_SILENT @@ -339,7 +339,7 @@ int nextwild(expand_T *xp, int type, int options, bool escape) if (xp->xp_numfiles <= 0 && p2 == NULL) { beep_flush(); - } else if (xp->xp_numfiles == 1) { + } else if (xp->xp_numfiles == 1 && !(options & WILD_KEEP_SOLE_ITEM)) { // free expanded pattern ExpandOne(xp, NULL, NULL, 0, WILD_FREE); } |