aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorzeertzjq <zeertzjq@outlook.com>2021-11-17 07:07:15 +0800
committerzeertzjq <zeertzjq@outlook.com>2021-11-17 07:11:40 +0800
commit8c24e1462c567c30410d3a45e552ecffc95bbd1d (patch)
tree07f01e715a4fb7f5c69bfaa26e039cf67c2c167e /test/functional
parenteba317d7a907a76e6e265c0fe0b97a87f17cf943 (diff)
downloadrneovim-8c24e1462c567c30410d3a45e552ecffc95bbd1d.tar.gz
rneovim-8c24e1462c567c30410d3a45e552ecffc95bbd1d.tar.bz2
rneovim-8c24e1462c567c30410d3a45e552ecffc95bbd1d.zip
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) https://github.com/vim/vim/commit/eed9d46293f0842aad0d50ff3a526f9a48b12421 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.
Diffstat (limited to 'test/functional')
-rw-r--r--test/functional/options/chars_spec.lua16
1 files changed, 15 insertions, 1 deletions
diff --git a/test/functional/options/chars_spec.lua b/test/functional/options/chars_spec.lua
index 5439ca3dba..aa54b8a04a 100644
--- a/test/functional/options/chars_spec.lua
+++ b/test/functional/options/chars_spec.lua
@@ -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)