mirror of
https://github.com/neovim/neovim.git
synced 2025-12-10 00:22:41 +00:00
vim-patch:8.2.2518: 'listchars' should be window-local
Problem: 'listchars' should be window-local.
Solution: Make 'listchars' global-local. (Yegappan Lakshmanan, Marco Hinz,
closes vim/vim#5206, closes vim/vim#7850)
eed9d46293
Nvim already has this feature, but it implements :set listchars the same
as :setglobal listchars, which is incorrect. Vim's implementation of
:set listchars is correct: using :set listchars clears local value.
This commit is contained in:
@@ -122,7 +122,7 @@ describe("'listchars'", function()
|
||||
|
|
||||
]])
|
||||
end)
|
||||
it('has value local to window', function()
|
||||
it('has window-local value', function()
|
||||
feed('i<tab><tab><tab><esc>')
|
||||
command('set list laststatus=0')
|
||||
command('setl listchars=tab:<->')
|
||||
@@ -136,4 +136,18 @@ describe("'listchars'", function()
|
||||
|
|
||||
]])
|
||||
end)
|
||||
it('using :set clears window-local value', function()
|
||||
feed('i<tab><tab><tab><esc>')
|
||||
command('set list laststatus=0')
|
||||
command('setl listchars=tab:<->')
|
||||
command('vsplit')
|
||||
command('set listchars=tab:>-,eol:$')
|
||||
screen:expect([[
|
||||
>------->-------^>-------$│<------><------><------>|
|
||||
~ │~ |
|
||||
~ │~ |
|
||||
~ │~ |
|
||||
|
|
||||
]])
|
||||
end)
|
||||
end)
|
||||
|
||||
Reference in New Issue
Block a user