patch 9.1.1750: completion: preinserted text highlighed using ComplMatchIns
Problem: completion: preinserted text highlighed using ComplMatchIns
Solution: Use highlighting group PreInsert and update the documentation
(Girish Palya).
When "preinsert" is included in 'completeopt', only the PreInsert
highlight group should be applied, whether autocompletion is active or not.
Previously, ComplMatchIns was used when autocompletion was not enabled.
Related to https://github.com/vim/vim/pull/18213.
closes: #18254
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
f6659f6e61
commit
2525c56e42
@ -1,4 +1,4 @@
|
||||
*options.txt* For Vim version 9.1. Last change: 2025 Sep 08
|
||||
*options.txt* For Vim version 9.1. Last change: 2025 Sep 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -2303,13 +2303,13 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
preinsert
|
||||
When autocompletion is not enabled, inserts the part of the
|
||||
first candidate word beyond the current completion leader,
|
||||
highlighted with |hl-ComplMatchIns|. The cursor does not
|
||||
highlighted with |hl-PreInsert|. The cursor does not
|
||||
move. Requires 'fuzzy' unset and 'menuone' in 'completeopt'.
|
||||
|
||||
When 'autocomplete' is enabled, inserts the longest common
|
||||
prefix of matches (from all shown items or buffer-specific
|
||||
matches), highlighted with |hl-PreInsert|. This occurs only
|
||||
when no menu item is selected. Press CTRL-Y to accept.
|
||||
prefix of matches (from all shown items or from the
|
||||
current buffer items). This occurs only when no menu item
|
||||
is selected. Press CTRL-Y to accept.
|
||||
|
||||
preview Show extra information about the currently selected
|
||||
completion in the preview window. Only works in
|
||||
@ -4725,7 +4725,7 @@ A jump table for the options with a short description can be found at |Q_op|.
|
||||
|hl-PmenuThumb| X popup menu scrollbar thumb
|
||||
|hl-PmenuMatch| k popup menu matched text
|
||||
|hl-PmenuMatchSel| < popup menu matched text in selected line
|
||||
|hl-PreInsert| I text inserted when "preinsert" and 'autocomplete'
|
||||
|hl-PreInsert| I text inserted when "preinsert" is in 'completeopt'
|
||||
|
||||
The display modes are:
|
||||
r reverse (termcap entry "mr" and "me")
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Sep 08
|
||||
*syntax.txt* For Vim version 9.1. Last change: 2025 Sep 10
|
||||
|
||||
|
||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||
@ -5999,7 +5999,7 @@ PmenuMatchSel Popup menu: Matched text in selected item. Applied in
|
||||
*hl-ComplMatchIns*
|
||||
ComplMatchIns Matched text of the currently inserted completion.
|
||||
*hl-PreInsert*
|
||||
PreInsert Text inserted during autocompletion when "preinsert".
|
||||
PreInsert Text inserted when "preinsert" is in 'completeopt'.
|
||||
*hl-PopupSelected*
|
||||
PopupSelected Popup window created with |popup_menu()|. Linked to
|
||||
|hl-PmenuSel| by default.
|
||||
|
||||
Reference in New Issue
Block a user