diff options
| author | Jakub Łuczyński <doubleloop@users.noreply.github.com> | 2018-01-29 02:01:16 +0100 | 
|---|---|---|
| committer | Marco Hinz <mh.codebro+github@gmail.com> | 2018-01-29 02:01:16 +0100 | 
| commit | 9a36337d32481e0324fe85e2b4886e02f8f74a2c (patch) | |
| tree | 4339514fada975c7fdf7f6e6d201bc2578df0825 /src/nvim/ex_getln.c | |
| parent | 2569fabf04fa820814f2e13ac7579c5d759327f0 (diff) | |
| download | rneovim-9a36337d32481e0324fe85e2b4886e02f8f74a2c.tar.gz rneovim-9a36337d32481e0324fe85e2b4886e02f8f74a2c.tar.bz2 rneovim-9a36337d32481e0324fe85e2b4886e02f8f74a2c.zip  | |
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)
https://github.com/vim/vim/commit/ef8eb0897819099fb00d675afb9bffe1d008c45e
Diffstat (limited to 'src/nvim/ex_getln.c')
| -rw-r--r-- | src/nvim/ex_getln.c | 12 | 
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c index 54bbe66620..c4e0827dad 100644 --- a/src/nvim/ex_getln.c +++ b/src/nvim/ex_getln.c @@ -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  | 
