Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@doubleloop
Copy link
Contributor

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)

vim/vim@ef8eb08

else if (wildmenu)
win_redr_status_matches(xp, num_files, files_found, 0, showtail);
win_redr_status_matches(xp, num_files, files_found, -1, showtail);
else {
Copy link
Contributor

@mhinz mhinz Jan 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will probably see the lint job fail, because Nvim tries to improve the codebase of Vim step-by-step. That involves style changes as well. Nvim requires to always use braces when using statements like if/else if/else.

Our CI checks for the required style by looking at the surrounding lines of changed lines in a commit. So.. you will probably need to change this to:

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 {

You can run make clint to check for this locally. (No need to install clint, it's part of the codebase.)

EDIT: Here the failing job: https://travis-ci.org/neovim/neovim/jobs/334501774#L2443-L2446

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try running make clint. It complains about a few other things as well.

(I know this can be annoying if you just want to fix the code, but unfortunately it's needed with Vim's old codebase.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I executed make clint and fixed the linking errors. Sry, my first PR here.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to be sorry. ;-) Well done!

I'll just wait for all tests to be green and then merge it afterwards.

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)

vim/vim@ef8eb08
@mhinz mhinz merged commit 9a36337 into neovim:master Jan 29, 2018
@mhinz
Copy link
Contributor

mhinz commented Jan 29, 2018

Perfect. Thanks!

@doubleloop doubleloop deleted the vim-8.0.0528 branch January 29, 2018 01:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants