diff options
author | Yee Cheng Chin <ychin.git@gmail.com> | 2023-10-17 10:56:25 +0200 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-10-17 10:56:25 +0200 |
commit | 209ec90b9b9bd948d76511c9cd2b17f47a97afe6 (patch) | |
tree | 5a74b51ad3571a32852a7348b77c3637cf8fb8ce /runtime | |
parent | 396058acd0cc66e5071d052e03d2067b134952af (diff) |
patch 9.0.2037: A few remaining cmdline completion issues with C-E/Yv9.0.2037
Problem: A few remaining cmdline completion issues with C-E/Y
Solution: Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not
used at the end
Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not used at the end
A few places in the cmdline completion code only works properly when the
user hits Tab (or 'wildchar') at the end of the cmdline, even though
it's supposed to work even in the middle of the line.
For fuzzy search, `:e ++ff`, and `:set hl=`, fix completion code to make
sure to use `xp_pattern_len` instead of assuming the entire `xp_pattern`
is the search pattern (since it contains texts after the cursor).
Fix Ctrl-E / Ctrl-Y to not jump to the end when canceling/accepting a
wildmenu completion. Also, make them work even when not using
`set wildoptions+=pum` as there is no drawback to doing so.
(Related issue where this was brought up: #13331)
closes: #13362
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/doc/index.txt | 4 | ||||
-rw-r--r-- | runtime/doc/options.txt | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/runtime/doc/index.txt b/runtime/doc/index.txt index a9a8eec257..6f4b5d74db 100644 --- a/runtime/doc/index.txt +++ b/runtime/doc/index.txt @@ -1119,12 +1119,12 @@ commands in wildmenu mode (see 'wildmenu') <Left> select the previous match / move up to parent <Right> select the next match / move down to submenu <CR> move into submenu when doing menu completion + CTRL-E stop completion and go back to original text + CTRL-Y accept selected match and stop completion other stop completion and insert the typed character commands in wildmenu mode with 'wildoptions' set to "pum" - CTRL-E stop completion and go back to original text - CTRL-Y accept selected match and stop completion <PageUp> select a match several entries back <PageDown> select a match several entries forward diff --git a/runtime/doc/options.txt b/runtime/doc/options.txt index 86a734f6e6..cdb4992a74 100644 --- a/runtime/doc/options.txt +++ b/runtime/doc/options.txt @@ -9323,6 +9323,10 @@ A jump table for the options with a short description can be found at |Q_op|. CTRL-N - go to the next entry <CR> - in menu completion, when the cursor is just after a dot: move into a submenu. + CTRL-E - end completion, go back to what was there before + selecting a match. + CTRL-Y - accept the currently selected match and stop + completion. When not using the popup menu for command line completion, the following keys have special meanings: @@ -9341,10 +9345,6 @@ A jump table for the options with a short description can be found at |Q_op|. parent directory or parent menu. <Right> - in filename/menu name completion: move into a subdirectory or submenu. - CTRL-E - end completion, go back to what was there before - selecting a match. - CTRL-Y - accept the currently selected match and stop - completion. This makes the menus accessible from the console |console-menus|. |