mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.0.0528: highlight wrong text when 'wim' includes "longest" (#7927)
Problem: When 'wildmenu' is set and 'wildmode' has "longest" then the first
file name is highlighted, even though the text shows the longest
match.
Solution: Do not highlight the first match. (LemonBoy, closes vim/vim#1602)
ef8eb08978
This commit is contained in:
parent
2569fabf04
commit
9a36337d32
@ -4058,12 +4058,12 @@ static int showmatches(expand_T *xp, int wildmenu)
|
||||
msg_start(); /* prepare for paging */
|
||||
}
|
||||
|
||||
if (got_int)
|
||||
got_int = FALSE; /* only int. the completion, not the cmd line */
|
||||
else if (wildmenu)
|
||||
win_redr_status_matches(xp, num_files, files_found, 0, showtail);
|
||||
else {
|
||||
/* find the length of the longest file name */
|
||||
if (got_int) {
|
||||
got_int = false; // only int. the completion, not the cmd line
|
||||
} else if (wildmenu) {
|
||||
win_redr_status_matches(xp, num_files, files_found, -1, showtail);
|
||||
} else {
|
||||
// find the length of the longest file name
|
||||
maxlen = 0;
|
||||
for (i = 0; i < num_files; ++i) {
|
||||
if (!showtail && (xp->xp_context == EXPAND_FILES
|
||||
|
Loading…
Reference in New Issue
Block a user