diff options
| author | zeertzjq <zeertzjq@outlook.com> | 2021-09-19 13:13:44 +0800 |
|---|---|---|
| committer | zeertzjq <zeertzjq@outlook.com> | 2021-09-19 13:13:44 +0800 |
| commit | 32663b0f7e5911a8bced6b65dfc43622aadba198 (patch) | |
| tree | 4b340152f79e11f2f0b915477890e32e1c6bad5f /src/nvim/testdir | |
| parent | 963474321bcc02a5698c40b4677cd36ab8d4cebc (diff) | |
| download | rneovim-32663b0f7e5911a8bced6b65dfc43622aadba198.tar.gz rneovim-32663b0f7e5911a8bced6b65dfc43622aadba198.tar.bz2 rneovim-32663b0f7e5911a8bced6b65dfc43622aadba198.zip | |
vim-patch:8.1.1078: when 'listchars' is set a composing char on a space is wrong
Problem: When 'listchars' is set a composing char on a space is wrong.
Solution: Separate handling a non-breaking space and a space. (Yasuhiro
Matsumoto, closes vim/vim#4046)
https://github.com/vim/vim/commit/5f8069bbf5d989936a2f4d7a76ae42434017e3a2
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_listchars.vim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_listchars.vim b/src/nvim/testdir/test_listchars.vim index 4cb609aaf0..191e2afdf1 100644 --- a/src/nvim/testdir/test_listchars.vim +++ b/src/nvim/testdir/test_listchars.vim @@ -181,3 +181,26 @@ func Test_listchars() enew! set listchars& ff& endfunc + +func Test_listchars_composing() + enew! + let oldencoding=&encoding + set encoding=utf-8 + set ff=unix + set list + + set listchars=eol:$,space:_ + call append(0, [ + \ " \u3099 \u309A" + \ ]) + let expected = [ + \ "_ \u3099^I \u309A$" + \ ] + redraw! + call cursor(1, 1) + let got = ScreenLinesUtf8(1, virtcol('$')) + bw! + call assert_equal(expected, got) + let &encoding=oldencoding + set listchars& ff& +endfunction |