- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 6.4k
 
vim-patch:8.0.0528: highlight wrong text when 'wim' includes "longest" #7927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
        
          
                src/nvim/ex_getln.c
              
                Outdated
          
        
      | 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 { | 
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
There was a problem hiding this comment.
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.)
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
64a36ca    to
    6f18212      
    Compare
  
    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
    6f18212    to
    72d2e8a      
    Compare
  
    | 
           Perfect. Thanks!  | 
    
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