diff options
| author | Justin M. Keyes <justinkz@gmail.com> | 2017-07-29 02:26:21 +0200 |
|---|---|---|
| committer | ckelsel <ckelsel@hotmail.com> | 2017-08-14 07:45:49 +0800 |
| commit | dfd45f26f14179c6a4c75f06814c0ff6c0792349 (patch) | |
| tree | b2c3b92f10be447d5312e37715d5dab7b42e5b79 /src/nvim/testdir | |
| parent | 5e66c429e33db1c9a272c273cb3ad95c9bf64627 (diff) | |
| download | rneovim-dfd45f26f14179c6a4c75f06814c0ff6c0792349.tar.gz rneovim-dfd45f26f14179c6a4c75f06814c0ff6c0792349.tar.bz2 rneovim-dfd45f26f14179c6a4c75f06814c0ff6c0792349.zip | |
vim-patch:8.0.0126
Problem: Display problem with 'foldcolumn' and a wide character.
(esiegerman)
Solution: Don't use "extra" but an allocated buffer. (Christian Brabandt,
closes vim/vim#1310)
https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971
Diffstat (limited to 'src/nvim/testdir')
| -rw-r--r-- | src/nvim/testdir/test_display.vim | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/nvim/testdir/test_display.vim b/src/nvim/testdir/test_display.vim new file mode 100644 index 0000000000..ba7b7d7626 --- /dev/null +++ b/src/nvim/testdir/test_display.vim @@ -0,0 +1,37 @@ +" Test for displaying stuff +if !has('gui_running') && has('unix') + set term=ansi +endif + +function! s:screenline(lnum, nr) abort + let line = [] + for j in range(a:nr) + for c in range(1, winwidth(0)) + call add(line, nr2char(screenchar(a:lnum+j, c))) + endfor + call add(line, "\n") + endfor + return join(line, '') +endfunction + +function! Test_display_foldcolumn() + new + vnew + vert resize 25 + + 1put='e more noise blah blah‚ more stuff here' + + let expect = "e more noise blah blah<82\n> more stuff here \n" + + call cursor(2, 1) + norm! zt + redraw! + call assert_equal(expect, s:screenline(1,2)) + set fdc=2 + redraw! + let expect = " e more noise blah blah<\n 82> more stuff here \n" + call assert_equal(expect, s:screenline(1,2)) + + quit! + quit! +endfunction |