Mercurial > vim
annotate src/testdir/test_conceal.vim @ 25750:06e0400d9d69
Added tag v8.2.3410 for changeset 24b80aa4dd2e4e88b119dc1c0cc34cb52e010e4a
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 07 Sep 2021 21:00:06 +0200 |
parents | 20133655107a |
children | 37bc83bbda91 |
rev | line source |
---|---|
15426
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
1 " Tests for 'conceal'. |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
2 |
17657
0da9bc55c31a
patch 8.1.1826: tests use hand coded feature and option checks
Bram Moolenaar <Bram@vim.org>
parents:
16965
diff
changeset
|
3 source check.vim |
0da9bc55c31a
patch 8.1.1826: tests use hand coded feature and option checks
Bram Moolenaar <Bram@vim.org>
parents:
16965
diff
changeset
|
4 CheckFeature conceal |
15426
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
5 |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
6 source screendump.vim |
17657
0da9bc55c31a
patch 8.1.1826: tests use hand coded feature and option checks
Bram Moolenaar <Bram@vim.org>
parents:
16965
diff
changeset
|
7 CheckScreendump |
15426
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
8 |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
9 func Test_conceal_two_windows() |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
10 let code =<< trim [CODE] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
11 let lines = ["one one one one one", "two |hidden| here", "three |hidden| three"] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
12 call setline(1, lines) |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
13 syntax match test /|hidden|/ conceal |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
14 set conceallevel=2 |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
15 set concealcursor= |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
16 exe "normal /here\r" |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
17 new |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
18 call setline(1, lines) |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
19 call setline(4, "Second window") |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
20 syntax match test /|hidden|/ conceal |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
21 set conceallevel=2 |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
22 set concealcursor=nc |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
23 exe "normal /here\r" |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
24 [CODE] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
25 |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
26 call writefile(code, 'XTest_conceal') |
15426
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
27 " Check that cursor line is concealed |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
28 let buf = RunVimInTerminal('-S XTest_conceal', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
29 call VerifyScreenDump(buf, 'Test_conceal_two_windows_01', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
30 |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
31 " Check that with concealed text vertical cursor movement is correct. |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
32 call term_sendkeys(buf, "k") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
33 call VerifyScreenDump(buf, 'Test_conceal_two_windows_02', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
34 |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
35 " Check that with cursor line is not concealed |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
36 call term_sendkeys(buf, "j") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
37 call term_sendkeys(buf, ":set concealcursor=\r") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
38 call VerifyScreenDump(buf, 'Test_conceal_two_windows_03', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
39 |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
40 " Check that with cursor line is not concealed when moving cursor down |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
41 call term_sendkeys(buf, "j") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
42 call VerifyScreenDump(buf, 'Test_conceal_two_windows_04', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
43 |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
44 " Check that with cursor line is not concealed when switching windows |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
45 call term_sendkeys(buf, "\<C-W>\<C-W>") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
46 call VerifyScreenDump(buf, 'Test_conceal_two_windows_05', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
47 |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
48 " Check that with cursor line is only concealed in Normal mode |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
49 call term_sendkeys(buf, ":set concealcursor=n\r") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
50 call VerifyScreenDump(buf, 'Test_conceal_two_windows_06n', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
51 call term_sendkeys(buf, "a") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
52 call VerifyScreenDump(buf, 'Test_conceal_two_windows_06i', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
53 call term_sendkeys(buf, "\<Esc>/e") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
54 call VerifyScreenDump(buf, 'Test_conceal_two_windows_06c', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
55 call term_sendkeys(buf, "\<Esc>v") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
56 call VerifyScreenDump(buf, 'Test_conceal_two_windows_06v', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
57 call term_sendkeys(buf, "\<Esc>") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
58 |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
59 " Check that with cursor line is only concealed in Insert mode |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
60 call term_sendkeys(buf, ":set concealcursor=i\r") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
61 call VerifyScreenDump(buf, 'Test_conceal_two_windows_07n', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
62 call term_sendkeys(buf, "a") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
63 call VerifyScreenDump(buf, 'Test_conceal_two_windows_07i', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
64 call term_sendkeys(buf, "\<Esc>/e") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
65 call VerifyScreenDump(buf, 'Test_conceal_two_windows_07c', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
66 call term_sendkeys(buf, "\<Esc>v") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
67 call VerifyScreenDump(buf, 'Test_conceal_two_windows_07v', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
68 call term_sendkeys(buf, "\<Esc>") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
69 |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
70 " Check that with cursor line is only concealed in Command mode |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
71 call term_sendkeys(buf, ":set concealcursor=c\r") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
72 call VerifyScreenDump(buf, 'Test_conceal_two_windows_08n', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
73 call term_sendkeys(buf, "a") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
74 call VerifyScreenDump(buf, 'Test_conceal_two_windows_08i', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
75 call term_sendkeys(buf, "\<Esc>/e") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
76 call VerifyScreenDump(buf, 'Test_conceal_two_windows_08c', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
77 call term_sendkeys(buf, "\<Esc>v") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
78 call VerifyScreenDump(buf, 'Test_conceal_two_windows_08v', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
79 call term_sendkeys(buf, "\<Esc>") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
80 |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
81 " Check that with cursor line is only concealed in Visual mode |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
82 call term_sendkeys(buf, ":set concealcursor=v\r") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
83 call VerifyScreenDump(buf, 'Test_conceal_two_windows_09n', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
84 call term_sendkeys(buf, "a") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
85 call VerifyScreenDump(buf, 'Test_conceal_two_windows_09i', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
86 call term_sendkeys(buf, "\<Esc>/e") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
87 call VerifyScreenDump(buf, 'Test_conceal_two_windows_09c', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
88 call term_sendkeys(buf, "\<Esc>v") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
89 call VerifyScreenDump(buf, 'Test_conceal_two_windows_09v', {}) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
90 call term_sendkeys(buf, "\<Esc>") |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
91 |
15434
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
92 " Check moving the cursor while in insert mode. |
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
93 call term_sendkeys(buf, ":set concealcursor=\r") |
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
94 call term_sendkeys(buf, "a") |
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
95 call VerifyScreenDump(buf, 'Test_conceal_two_windows_10', {}) |
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
96 call term_sendkeys(buf, "\<Down>") |
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
97 call VerifyScreenDump(buf, 'Test_conceal_two_windows_11', {}) |
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
98 call term_sendkeys(buf, "\<Esc>") |
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
99 |
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
100 " Check the "o" command |
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
101 call VerifyScreenDump(buf, 'Test_conceal_two_windows_12', {}) |
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
102 call term_sendkeys(buf, "o") |
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
103 call VerifyScreenDump(buf, 'Test_conceal_two_windows_13', {}) |
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
104 call term_sendkeys(buf, "\<Esc>") |
80e79573dd6e
patch 8.1.0725: conceal mode is not completely tested
Bram Moolenaar <Bram@vim.org>
parents:
15426
diff
changeset
|
105 |
15426
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
106 " clean up |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
107 call StopVimInTerminal(buf) |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
108 call delete('XTest_conceal') |
8b78878311e0
patch 8.1.0721: conceal mode is not sufficiently tested
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
109 endfunc |
15476
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
110 |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
111 func Test_conceal_with_cursorline() |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
112 " Opens a help window, where 'conceal' is set, switches to the other window |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
113 " where 'cursorline' needs to be updated when the cursor moves. |
16720
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
114 let code =<< trim [CODE] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
115 set cursorline |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
116 normal othis is a test |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
117 new |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
118 call setline(1, ["one", "two", "three", "four", "five"]) |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
119 set ft=help |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
120 normal M |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
121 [CODE] |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
122 |
9c90cf08cfa8
patch 8.1.1362: code and data in tests can be hard to read
Bram Moolenaar <Bram@vim.org>
parents:
15476
diff
changeset
|
123 call writefile(code, 'XTest_conceal_cul') |
15476
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
124 let buf = RunVimInTerminal('-S XTest_conceal_cul', {}) |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
125 call VerifyScreenDump(buf, 'Test_conceal_cul_01', {}) |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
126 |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
127 call term_sendkeys(buf, ":wincmd w\r") |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
128 call VerifyScreenDump(buf, 'Test_conceal_cul_02', {}) |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
129 |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
130 call term_sendkeys(buf, "k") |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
131 call VerifyScreenDump(buf, 'Test_conceal_cul_03', {}) |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
132 |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
133 " clean up |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
134 call StopVimInTerminal(buf) |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
135 call delete('XTest_conceal_cul') |
5b0f37d844b3
patch 8.1.0746: highlighting not updated with conceal and 'cursorline'
Bram Moolenaar <Bram@vim.org>
parents:
15434
diff
changeset
|
136 endfunc |
18072
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
137 |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
138 func Test_conceal_resize_term() |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
139 let code =<< trim [CODE] |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
140 call setline(1, '`one` `two` `three` `four` `five`, the backticks should be concealed') |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
141 setl cocu=n cole=3 |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
142 syn region CommentCodeSpan matchgroup=Comment start=/`/ end=/`/ concealends |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
143 normal fb |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
144 [CODE] |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
145 call writefile(code, 'XTest_conceal_resize') |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
146 let buf = RunVimInTerminal('-S XTest_conceal_resize', {'rows': 6}) |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
147 call VerifyScreenDump(buf, 'Test_conceal_resize_01', {}) |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
148 |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
149 call win_execute(buf->win_findbuf()[0], 'wincmd +') |
19954
c087099e9163
patch 8.2.0533: tests using term_wait() can still be flaky
Bram Moolenaar <Bram@vim.org>
parents:
18870
diff
changeset
|
150 call TermWait(buf) |
18072
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
151 call VerifyScreenDump(buf, 'Test_conceal_resize_02', {}) |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
152 |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
153 " clean up |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
154 call StopVimInTerminal(buf) |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
155 call delete('XTest_conceal_resize') |
5f1554b2587c
patch 8.1.2031: cursor position wrong when resizing and using conceal
Bram Moolenaar <Bram@vim.org>
parents:
17657
diff
changeset
|
156 endfunc |
18870
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
157 |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
158 " Tests for correct display (cursor column position) with +conceal and |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
159 " tabulators. Need to run this test in a separate Vim instance. Otherwise the |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
160 " screen is not updated (lazy redraw) and the cursor position is wrong. |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
161 func Test_conceal_cursor_pos() |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
162 let code =<< trim [CODE] |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
163 :let l = ['start:', '.concealed. text', "|concealed|\ttext"] |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
164 :let l += ['', "\t.concealed.\ttext", "\t|concealed|\ttext", ''] |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
165 :let l += [".a.\t.b.\t.c.\t.d.", "|a|\t|b|\t|c|\t|d|"] |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
166 :call append(0, l) |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
167 :call cursor(1, 1) |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
168 :" Conceal settings. |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
169 :set conceallevel=2 |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
170 :set concealcursor=nc |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
171 :syntax match test /|/ conceal |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
172 :" Save current cursor position. Only works in <expr> mode, can't be used |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
173 :" with :normal because it moves the cursor to the command line. Thanks |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
174 :" to ZyX <zyx.vim@gmail.com> for the idea to use an <expr> mapping. |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
175 :let curpos = [] |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
176 :nnoremap <expr> GG ":let curpos += ['".screenrow().":".screencol()."']\n" |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
177 :normal ztj |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
178 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
179 :" We should end up in the same column when running these commands on the |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
180 :" two lines. |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
181 :normal ft |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
182 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
183 :normal $ |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
184 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
185 :normal 0j |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
186 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
187 :normal ft |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
188 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
189 :normal $ |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
190 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
191 :normal 0j0j |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
192 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
193 :" Same for next test block. |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
194 :normal ft |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
195 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
196 :normal $ |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
197 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
198 :normal 0j |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
199 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
200 :normal ft |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
201 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
202 :normal $ |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
203 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
204 :normal 0j0j |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
205 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
206 :" And check W with multiple tabs and conceals in a line. |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
207 :normal W |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
208 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
209 :normal W |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
210 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
211 :normal W |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
212 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
213 :normal $ |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
214 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
215 :normal 0j |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
216 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
217 :normal W |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
218 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
219 :normal W |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
220 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
221 :normal W |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
222 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
223 :normal $ |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
224 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
225 :set lbr |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
226 :normal $ |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
227 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
228 :set list listchars=tab:>- |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
229 :normal 0 |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
230 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
231 :normal W |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
232 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
233 :normal W |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
234 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
235 :normal W |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
236 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
237 :normal $ |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
238 GGk |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
239 :call writefile(curpos, 'Xconceal_curpos.out') |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
240 :q! |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
241 |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
242 [CODE] |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
243 call writefile(code, 'XTest_conceal_curpos') |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
244 |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
245 if RunVim([], [], '-s XTest_conceal_curpos') |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
246 call assert_equal([ |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
247 \ '2:1', '2:17', '2:20', '3:1', '3:17', '3:20', '5:8', '5:25', |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
248 \ '5:28', '6:8', '6:25', '6:28', '8:1', '8:9', '8:17', '8:25', |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
249 \ '8:27', '9:1', '9:9', '9:17', '9:25', '9:26', '9:26', '9:1', |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
250 \ '9:9', '9:17', '9:25', '9:26'], readfile('Xconceal_curpos.out')) |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
251 endif |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
252 |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
253 call delete('Xconceal_curpos.out') |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
254 call delete('XTest_conceal_curpos') |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
255 endfunc |
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
256 |
21014
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
257 func Test_conceal_eol() |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
258 new! |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
259 setlocal concealcursor=n conceallevel=1 |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
260 call setline(1, ["x", ""]) |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
261 call matchaddpos('Conceal', [[2, 1, 1]], 2, -1, {'conceal': 1}) |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
262 redraw! |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
263 |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
264 call assert_notequal(screenchar(1, 1), screenchar(2, 2)) |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
265 call assert_equal(screenattr(1, 1), screenattr(1, 2)) |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
266 call assert_equal(screenattr(1, 2), screenattr(2, 2)) |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
267 call assert_equal(screenattr(2, 1), screenattr(2, 2)) |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
268 |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
269 set list |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
270 redraw! |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
271 |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
272 call assert_equal(screenattr(1, 1), screenattr(2, 2)) |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
273 call assert_notequal(screenattr(1, 1), screenattr(1, 2)) |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
274 call assert_notequal(screenattr(1, 2), screenattr(2, 1)) |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
275 |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
276 set nolist |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
277 endfunc |
20133655107a
patch 8.2.1058: multiline conceal causes display errors
Bram Moolenaar <Bram@vim.org>
parents:
19954
diff
changeset
|
278 |
18870
1895dd434ecf
patch 8.1.2421: test88 is old style
Bram Moolenaar <Bram@vim.org>
parents:
18072
diff
changeset
|
279 " vim: shiftwidth=2 sts=2 expandtab |