Mercurial > vim
annotate src/testdir/test88.in @ 16049:75c99104f6b5
Added tag v8.1.1029 for changeset 728bef04b0d46e980c878024417f9c124d92909b
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 21 Mar 2019 21:00:06 +0100 |
parents | 43f444efe6a2 |
children |
rev | line source |
---|---|
3986 | 1 vim: set ft=vim |
2 | |
3 Tests for correct display (cursor column position) with +conceal and | |
4 tabulators. | |
5 | |
6 STARTTEST | |
7 :so small.vim | |
8 :if !has('conceal') | |
9 e! test.ok | |
10 wq! test.out | |
11 :endif | |
12 :" Conceal settings. | |
13 :set conceallevel=2 | |
14 :set concealcursor=nc | |
15 :syntax match test /|/ conceal | |
16 :" Save current cursor position. Only works in <expr> mode, can't be used | |
17 :" with :normal because it moves the cursor to the command line. Thanks to ZyX | |
18 :" <zyx.vim@gmail.com> for the idea to use an <expr> mapping. | |
19 :let positions = [] | |
20 :nnoremap <expr> GG ":let positions += ['".screenrow().":".screencol()."']\n" | |
21 :" Start test. | |
22 /^start: | |
23 :normal ztj | |
24 GGk | |
25 :" We should end up in the same column when running these commands on the two | |
26 :" lines. | |
27 :normal ft | |
28 GGk | |
29 :normal $ | |
30 GGk | |
31 :normal 0j | |
32 GGk | |
33 :normal ft | |
34 GGk | |
35 :normal $ | |
36 GGk | |
37 :normal 0j0j | |
38 GGk | |
39 :" Same for next test block. | |
40 :normal ft | |
41 GGk | |
42 :normal $ | |
43 GGk | |
44 :normal 0j | |
45 GGk | |
46 :normal ft | |
47 GGk | |
48 :normal $ | |
49 GGk | |
50 :normal 0j0j | |
51 GGk | |
52 :" And check W with multiple tabs and conceals in a line. | |
53 :normal W | |
54 GGk | |
55 :normal W | |
56 GGk | |
57 :normal W | |
58 GGk | |
59 :normal $ | |
60 GGk | |
61 :normal 0j | |
62 GGk | |
63 :normal W | |
64 GGk | |
65 :normal W | |
66 GGk | |
67 :normal W | |
68 GGk | |
69 :normal $ | |
70 GGk | |
5174
42d592dbbec3
updated for version 7.4a.013
Bram Moolenaar <bram@vim.org>
parents:
3986
diff
changeset
|
71 :set lbr |
42d592dbbec3
updated for version 7.4a.013
Bram Moolenaar <bram@vim.org>
parents:
3986
diff
changeset
|
72 :normal $ |
42d592dbbec3
updated for version 7.4a.013
Bram Moolenaar <bram@vim.org>
parents:
3986
diff
changeset
|
73 GGk |
6627 | 74 :set list listchars=tab:>- |
75 :normal 0 | |
76 GGk | |
77 :normal W | |
78 GGk | |
79 :normal W | |
80 GGk | |
81 :normal W | |
82 GGk | |
83 :normal $ | |
84 GGk | |
3986 | 85 :" Display result. |
86 :call append('$', 'end:') | |
87 :call append('$', positions) | |
88 :/^end/,$wq! test.out | |
89 ENDTEST | |
90 | |
91 start: | |
92 .concealed. text | |
93 |concealed| text | |
94 | |
95 .concealed. text | |
96 |concealed| text | |
97 | |
98 .a. .b. .c. .d. | |
99 |a| |b| |c| |d| |