aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/testdir
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-02-20 00:41:06 -0500
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2020-02-20 22:07:18 -0500
commit13b6f7a80676a0b43325f39dcaebbb2e7adf81c9 (patch)
tree41df9862520ead86ace11d75538924c57d915c57 /src/nvim/testdir
parent9897ad3606a780c764ed7382a80425af613a7c63 (diff)
downloadrneovim-13b6f7a80676a0b43325f39dcaebbb2e7adf81c9.tar.gz
rneovim-13b6f7a80676a0b43325f39dcaebbb2e7adf81c9.tar.bz2
rneovim-13b6f7a80676a0b43325f39dcaebbb2e7adf81c9.zip
vim-patch:8.1.1868: multi-byte chars in 'listchars' fail with 'linebreak' set
Problem: Multibyte characters in 'listchars' don't work correctly if 'linebreak' is also enabled. (Martin Tournoij) Solution: Make it work correctly. (Christian Brabandt, closes vim/vim#4822, closes vim/vim#4812) https://github.com/vim/vim/commit/69cbbecf548f390197259ca30cfe147c3e59ce5a
Diffstat (limited to 'src/nvim/testdir')
-rw-r--r--src/nvim/testdir/test_listchars.vim20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_listchars.vim b/src/nvim/testdir/test_listchars.vim
index 57cfaa298e..dcc588120c 100644
--- a/src/nvim/testdir/test_listchars.vim
+++ b/src/nvim/testdir/test_listchars.vim
@@ -58,6 +58,26 @@ func Test_listchars()
call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$')))
endfor
+ " tab with 3rd character and linebreak set
+ set listchars-=tab:<=>
+ set listchars+=tab:<·>
+ set linebreak
+ let expected = [
+ \ '<······>aa<····>$',
+ \ '..bb<··>--$',
+ \ '...cccc>-$',
+ \ 'dd........ee--<>$',
+ \ '-$'
+ \ ]
+ redraw!
+ for i in range(1, 5)
+ call cursor(i, 1)
+ call assert_equal([expected[i - 1]], ScreenLines(i, virtcol('$')))
+ endfor
+ set nolinebreak
+ set listchars-=tab:<·>
+ set listchars+=tab:<=>
+
set listchars-=trail:-
let expected = [
\ '<======>aa<====>$',