Mercurial > vim
comparison src/testdir/test_listlbr.in @ 6026:d42a1d3b74d4 v7.4.353
updated for version 7.4.353
Problem: 'breakindent' doesn't work with the 'list' option.
Solution: Make it work. (Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 02 Jul 2014 20:00:47 +0200 |
parents | |
children | 50575818a97f |
comparison
equal
deleted
inserted
replaced
6025:ad317f586374 | 6026:d42a1d3b74d4 |
---|---|
1 Test for linebreak and list option | |
2 | |
3 STARTTEST | |
4 :so small.vim | |
5 :if !exists("+linebreak") | e! test.ok | w! test.out | qa! | endif | |
6 :10new|:vsp|:vert resize 20 | |
7 :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \" | |
8 :norm! zt | |
9 :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap | |
10 :fu! ScreenChar(width) | |
11 : let c='' | |
12 : for j in range(1,4) | |
13 : for i in range(1,a:width) | |
14 : let c.=nr2char(screenchar(j, i)) | |
15 : endfor | |
16 : let c.="\n" | |
17 : endfor | |
18 : return c | |
19 :endfu | |
20 :fu! DoRecordScreen() | |
21 : wincmd l | |
22 : $put =printf(\"\n%s\", g:test) | |
23 : $put =g:line | |
24 : wincmd p | |
25 :endfu | |
26 :let g:test="Test 1: set linebreak" | |
27 :redraw! | |
28 :let line=ScreenChar(winwidth(0)) | |
29 :call DoRecordScreen() | |
30 :let g:test="Test 2: set linebreak + set list" | |
31 :set linebreak list listchars= | |
32 :redraw! | |
33 :let line=ScreenChar(winwidth(0)) | |
34 :call DoRecordScreen() | |
35 :let g:test ="Test 3: set linebreak + set list + fancy listchars" | |
36 :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6" | |
37 :redraw! | |
38 :let line=ScreenChar(winwidth(0)) | |
39 :call DoRecordScreen() | |
40 :let g:test ="Test 4: set linebreak nolist" | |
41 :set nolist linebreak | |
42 :redraw! | |
43 :let line=ScreenChar(winwidth(0)) | |
44 :call DoRecordScreen() | |
45 :let g:test ="Test 5: set nolinebreak list" | |
46 :set list nolinebreak | |
47 :redraw! | |
48 :let line=ScreenChar(winwidth(0)) | |
49 :call DoRecordScreen() | |
50 :let g:test ="Test 6: set linebreak with tab and 1 line as long as screen: should break!" | |
51 :set nolist linebreak ts=8 | |
52 :let line="1\t".repeat('a', winwidth(0)-2) | |
53 :$put =line | |
54 :$ | |
55 :norm! zt | |
56 :redraw! | |
57 :let line=ScreenChar(winwidth(0)) | |
58 :call DoRecordScreen() | |
59 :%w! test.out | |
60 :qa! | |
61 ENDTEST | |
62 dummy text |