diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-24 06:52:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-24 06:52:50 +0800 |
commit | fe94e04893274b9c5697fb179eb6b00bc1cd3a91 (patch) | |
tree | 6b1b267b11f722fb7024332cc6109c775be0bd48 /test | |
parent | 951034614110cf2e4388645ee17ed4a315d0d382 (diff) | |
download | rneovim-fe94e04893274b9c5697fb179eb6b00bc1cd3a91.tar.gz rneovim-fe94e04893274b9c5697fb179eb6b00bc1cd3a91.tar.bz2 rneovim-fe94e04893274b9c5697fb179eb6b00bc1cd3a91.zip |
vim-patch:9.0.2126: unused assignments when checking 'listchars' (#26182)
Problem: Unused assignments when checking the value of 'listchars'.
Solution: Loop only once when just checking the value. Add a test to
check that this change doesn't cause double-free.
closes: vim/vim#13559
https://github.com/vim/vim/commit/00624a2fa08d04bdded240d474e9cfdc193dbe10
Diffstat (limited to 'test')
-rw-r--r-- | test/old/testdir/test_listchars.vim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/old/testdir/test_listchars.vim b/test/old/testdir/test_listchars.vim index 5366f503fc..179bdfa4a0 100644 --- a/test/old/testdir/test_listchars.vim +++ b/test/old/testdir/test_listchars.vim @@ -265,6 +265,11 @@ func Test_listchars() call Check_listchars(expected, 5, 12) call assert_equal(expected, split(execute("%list"), "\n")) + " Changing the value of 'ambiwidth' twice shouldn't cause double-free when + " "leadmultispace" is specified. + set ambiwidth=double + set ambiwidth& + " Test leadmultispace and lead and space normal ggdG set listchars=eol:$ " Accommodate Nvim default |