diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-11-23 20:47:16 +0100 |
---|---|---|
committer | Christian Brabandt <cb@256bit.org> | 2023-11-23 20:47:16 +0100 |
commit | 00624a2fa08d04bdded240d474e9cfdc193dbe10 (patch) | |
tree | 17b6983aab398412244607f29ce699ad7ed60ef1 /src/testdir | |
parent | 40ed6711bd385051021691980e8ce16375b4b510 (diff) |
patch 9.0.2126: unused assignments when checking 'listchars'v9.0.2126
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: #13559
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Diffstat (limited to 'src/testdir')
-rw-r--r-- | src/testdir/test_listchars.vim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/testdir/test_listchars.vim b/src/testdir/test_listchars.vim index 8628fb20e0..57ddcda7e5 100644 --- a/src/testdir/test_listchars.vim +++ b/src/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& |