annotate src/testdir/test_listlbr_utf8.in @ 6753:c1aa837853ea v7.4.699

patch 7.4.699 Problem: E315 when trying to delete a fold. (Yutao Yuan) Solution: Make sure the fold doesn't go beyond the last buffer line. (Christian Brabandt)
author Bram Moolenaar <bram@vim.org>
date Mon, 13 Apr 2015 20:52:36 +0200
parents 43f444efe6a2
children 8ebcd7f1ff5b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6062
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
1 Test for linebreak and list option in utf-8 mode
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
2
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
3 STARTTEST
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
4 :so small.vim
6528
7b8e3be930f3 updated for version 7.4.591
Bram Moolenaar <bram@vim.org>
parents: 6520
diff changeset
5 :if !exists("+linebreak") || !has("conceal") | e! test.ok | w! test.out | qa! | endif
6062
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
6 :so mbyte.vim
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
7 :if &enc !=? 'utf-8'|:e! test.ok|:w! test.out|qa!|endif
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
8 :10new|:vsp|:vert resize 20
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
9 :put =\"\tabcdef hijklmn\tpqrstuvwxyz\u00a01060ABCDEFGHIJKLMNOP \"
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
10 :norm! zt
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
11 :set ts=4 sw=4 sts=4 linebreak sbr=+ wrap
6520
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
12 :fu! ScreenChar(width, lines)
6062
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
13 : let c=''
6520
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
14 : for j in range(1,a:lines)
6062
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
15 : for i in range(1,a:width)
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
16 : let c.=nr2char(screenchar(j, i))
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
17 : endfor
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
18 : let c.="\n"
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
19 : endfor
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
20 : return c
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
21 :endfu
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
22 :fu! DoRecordScreen()
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
23 : wincmd l
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
24 : $put =printf(\"\n%s\", g:test)
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
25 : $put =g:line
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
26 : wincmd p
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
27 :endfu
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
28 :let g:test ="Test 1: set linebreak + set list + fancy listchars"
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
29 :exe "set linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
30 :redraw!
6520
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
31 :let line=ScreenChar(winwidth(0),4)
6062
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
32 :call DoRecordScreen()
6100
76e7fb736c0e updated for version 7.4.388
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
33 :"
6062
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
34 :let g:test ="Test 2: set nolinebreak list"
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
35 :set list nolinebreak
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
36 :redraw!
6520
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
37 :let line=ScreenChar(winwidth(0),4)
6062
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
38 :call DoRecordScreen()
6100
76e7fb736c0e updated for version 7.4.388
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
39 :"
76e7fb736c0e updated for version 7.4.388
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
40 :let g:test ="Test 3: set linebreak nolist"
76e7fb736c0e updated for version 7.4.388
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
41 :$put =\"\t*mask = nil;\"
76e7fb736c0e updated for version 7.4.388
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
42 :$
76e7fb736c0e updated for version 7.4.388
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
43 :norm! zt
76e7fb736c0e updated for version 7.4.388
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
44 :set nolist linebreak
76e7fb736c0e updated for version 7.4.388
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
45 :redraw!
6520
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
46 :let line=ScreenChar(winwidth(0),4)
6100
76e7fb736c0e updated for version 7.4.388
Bram Moolenaar <bram@vim.org>
parents: 6062
diff changeset
47 :call DoRecordScreen()
6520
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
48 :let g:test ="Test 4: set linebreak list listchars and concealing"
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
49 :let c_defines=['#define ABCDE 1','#define ABCDEF 1','#define ABCDEFG 1','#define ABCDEFGH 1', '#define MSG_MODE_FILE 1','#define MSG_MODE_CONSOLE 2','#define MSG_MODE_FILE_AND_CONSOLE 3','#define MSG_MODE_FILE_THEN_CONSOLE 4']
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
50 :call append('$', c_defines)
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
51 :vert resize 40
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
52 :$-7
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
53 :norm! zt
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
54 :set list linebreak listchars=tab:>- cole=1
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
55 :syn match Conceal conceal cchar=>'AB\|MSG_MODE'
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
56 :redraw!
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
57 :let line=ScreenChar(winwidth(0),7)
70793fedd25a updated for version 7.4.587
Bram Moolenaar <bram@vim.org>
parents: 6100
diff changeset
58 :call DoRecordScreen()
6627
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
59 :let g:test ="Test 5: set linebreak list listchars and concealing part2"
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
60 :let c_defines=['bbeeeeee ; some text']
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
61 :call append('$', c_defines)
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
62 :$
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
63 :norm! zt
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
64 :set nowrap ts=2 list linebreak listchars=tab:>- cole=2 concealcursor=n
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
65 :syn clear
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
66 :syn match meaning /;\s*\zs.*/
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
67 :syn match hasword /^\x\{8}/ contains=word
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
68 :syn match word /\<\x\{8}\>/ contains=beginword,endword contained
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
69 :syn match beginword /\<\x\x/ contained conceal
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
70 :syn match endword /\x\{6}\>/ contained
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
71 :hi meaning guibg=blue
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
72 :hi beginword guibg=green
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
73 :hi endword guibg=red
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
74 :redraw!
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
75 :let line=ScreenChar(winwidth(0),1)
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
76 :call DoRecordScreen()
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
77 :let g:test ="Test 6: Screenattributes for comment"
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
78 :$put =g:test
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
79 :call append('$', ' /* and some more */')
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
80 :exe "set ft=c ts=7 linebreak list listchars=nbsp:\u2423,tab:\u2595\u2014,trail:\u02d1,eol:\ub6"
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
81 :syntax on
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
82 :hi SpecialKey term=underline ctermfg=red guifg=red
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
83 :let attr=[]
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
84 :nnoremap <expr> GG ":let attr += ['".screenattr(screenrow(),screencol())."']\n"
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
85 :$
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
86 :norm! zt0
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
87 GGlGGlGGlGGlGGlGGlGGlGGlGGlGGl
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
88 :call append('$', ['ScreenAttributes for test6:'])
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
89 :if attr[0] != attr[1] && attr[1] != attr[3] && attr[3] != attr[5]
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
90 : call append('$', "Attribut 0 and 1 and 3 and 5 are different!")
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
91 :else
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
92 : call append('$', "Not all attributes are different")
43f444efe6a2 updated for version 7.4.639
Bram Moolenaar <bram@vim.org>
parents: 6528
diff changeset
93 :endif
6062
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
94 :%w! test.out
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
95 :qa!
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
96 ENDTEST
50575818a97f updated for version 7.4.370
Bram Moolenaar <bram@vim.org>
parents:
diff changeset
97 dummy text