comparison src/testdir/test_display.vim @ 10466:34b50194f82d v8.0.0126

commit https://github.com/vim/vim/commit/6270660611a151c5d0f614a5f0248ccdc80ed971 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 9 19:28:48 2016 +0100 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 #1310)
author Christian Brabandt <cb@256bit.org>
date Fri, 09 Dec 2016 19:30:04 +0100
parents
children 232a0d1d8f24
comparison
equal deleted inserted replaced
10465:8643fdf48ed9 10466:34b50194f82d
1 " Test for displaying stuff
2 if !has('gui_running') && has('unix')
3 set term=ansi
4 endif
5
6 function! s:screenline(lnum, nr) abort
7 let line = []
8 for j in range(a:nr)
9 for c in range(1, winwidth(0))
10 call add(line, nr2char(screenchar(a:lnum+j, c)))
11 endfor
12 call add(line, "\n")
13 endfor
14 return join(line, '')
15 endfunction
16
17 function! Test_display_foldcolumn()
18 new
19 vnew
20 vert resize 25
21
22 1put='e more noise blah blah‚ more stuff here'
23
24 let expect = "e more noise blah blah<82\n> more stuff here \n"
25
26 call cursor(2, 1)
27 norm! zt
28 redraw!
29 call assert_equal(expect, s:screenline(1,2))
30 set fdc=2
31 redraw!
32 let expect = " e more noise blah blah<\n 82> more stuff here \n"
33 call assert_equal(expect, s:screenline(1,2))
34
35 quit!
36 quit!
37 endfunction