mirror of
https://github.com/neovim/neovim.git
synced 2026-05-05 05:25:10 +00:00
vim-patch:9.1.1539: completion: messages don't respect 'shm' setting (#34923)
Problem: completion: messages don't respect 'shm' setting
Solution: Turn off completion messages when 'shortmess' includes "c"
(Girish Palya).
`:set shortmess+=c` is intended to reduce noise during completion by
suppressing messages.
Previously, some completion messages still appeared regardless of this setting.
This change ensures that **all** completion-related messages are suppressed
when `'c'` is present in `'shortmess'`.
Not entirely sure if the original behavior was intentional. If there's a
reason certain messages were always shown, feel free to close this without
merging.
closes: vim/vim#17737
fe1d3c8af7
Co-authored-by: Girish Palya <girishji@gmail.com>
This commit is contained in:
@@ -1373,4 +1373,33 @@ describe('completion', function()
|
||||
{5:-- Keyword completion (^N^P) The only match} |
|
||||
]])
|
||||
end)
|
||||
|
||||
-- oldtest: Test_shortmess()
|
||||
it('shortmess+=c turns off completion messages', function()
|
||||
command([[call setline(1, ['hello', 'hullo', 'heee'])]])
|
||||
feed('Goh<C-N>')
|
||||
screen:expect([[
|
||||
hello |
|
||||
hullo |
|
||||
heee |
|
||||
hello^ |
|
||||
{12:hello }{1: }|
|
||||
{4:hullo }{1: }|
|
||||
{4:heee }{1: }|
|
||||
{5:-- Keyword completion (^N^P) }{6:match 1 of 3} |
|
||||
]])
|
||||
feed('<Esc>')
|
||||
command('set shm+=c')
|
||||
feed('Sh<C-N>')
|
||||
screen:expect([[
|
||||
hello |
|
||||
hullo |
|
||||
heee |
|
||||
hello^ |
|
||||
{12:hello }{1: }|
|
||||
{4:hullo }{1: }|
|
||||
{4:heee }{1: }|
|
||||
{5:-- INSERT --} |
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user