diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-12-09 19:28:48 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-12-09 19:28:48 +0100 |
commit | 6270660611a151c5d0f614a5f0248ccdc80ed971 (patch) | |
tree | 407a24e99176ba9a223a15f27f7d89ba14f5f8d0 /src/testdir/test_display.vim | |
parent | eaaa9bbda6ec0a8589a9b23720f95bffe01dc267 (diff) | |
download | vim-git-6270660611a151c5d0f614a5f0248ccdc80ed971.tar.gz |
patch 8.0.0126v8.0.0126
Problem: Display problem with 'foldcolumn' and a wide character.
(esiegerman)
Solution: Don't use "extra" but an allocated buffer. (Christian Brabandt,
closes #1310)
Diffstat (limited to 'src/testdir/test_display.vim')
-rw-r--r-- | src/testdir/test_display.vim | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/testdir/test_display.vim b/src/testdir/test_display.vim new file mode 100644 index 000000000..ba7b7d762 --- /dev/null +++ b/src/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 |