Mercurial > vim
annotate src/testdir/test_popupwin_textprop.vim @ 18441:176f51ad4211
Added tag v8.1.2214 for changeset d6cb1e706fb7d03bb5b444e219a039696e611fac
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 24 Oct 2019 22:45:04 +0200 |
parents | 5d5b460926ca |
children | 15fe2bd478b0 |
rev | line source |
---|---|
17865
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
1 " Tests for popup windows for text properties |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
2 |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
3 source check.vim |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
4 CheckFeature textprop |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
5 |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
6 source screendump.vim |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
7 CheckScreendump |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
8 |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
9 func Test_textprop_popup() |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
10 let lines =<< trim END |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
11 call setline(1, range(1, 100)) |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
12 call setline(50, 'some text to work with') |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
13 50 |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
14 normal zz |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
15 set scrolloff=0 |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
16 call prop_type_add('popupMarker', #{highlight: 'DiffAdd'}) |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
17 call prop_add(50, 11, #{ |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
18 \ length: 7, |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
19 \ type: 'popupMarker', |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
20 \ }) |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
21 let winid = popup_create('the text', #{ |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
22 \ pos: 'botleft', |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
23 \ textprop: 'popupMarker', |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
24 \ border: [], |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
25 \ padding: [0,1,0,1], |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
26 \ close: 'click', |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
27 \ }) |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
28 END |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
29 call writefile(lines, 'XtestTextpropPopup') |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
30 let buf = RunVimInTerminal('-S XtestTextpropPopup', #{rows: 10}) |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
31 call VerifyScreenDump(buf, 'Test_popup_textprop_01', {}) |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
32 |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
33 call term_sendkeys(buf, "zt") |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
34 call VerifyScreenDump(buf, 'Test_popup_textprop_02', {}) |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
35 |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
36 call term_sendkeys(buf, "zzIawe\<Esc>") |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
37 call VerifyScreenDump(buf, 'Test_popup_textprop_03', {}) |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
38 |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
39 call term_sendkeys(buf, "0dw") |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
40 call VerifyScreenDump(buf, 'Test_popup_textprop_04', {}) |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
41 |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
42 call term_sendkeys(buf, "Oinserted\<Esc>") |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
43 call VerifyScreenDump(buf, 'Test_popup_textprop_05', {}) |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
44 |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
45 call term_sendkeys(buf, "k2dd") |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
46 call VerifyScreenDump(buf, 'Test_popup_textprop_06', {}) |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
47 |
17879
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
48 call term_sendkeys(buf, "4\<C-E>") |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
49 call VerifyScreenDump(buf, 'Test_popup_textprop_07', {}) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
50 |
17865
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
51 " clean up |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
52 call StopVimInTerminal(buf) |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
53 call delete('XtestTextpropPopup') |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
54 endfunc |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
55 |
17875
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
56 func Test_textprop_popup_corners() |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
57 let lines =<< trim END |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
58 call setline(1, range(1, 100)) |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
59 call setline(50, 'now working with some longer text here') |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
60 50 |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
61 normal zz |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
62 set scrolloff=0 |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
63 call prop_type_add('popupMarker', #{highlight: 'DiffAdd'}) |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
64 call prop_add(50, 23, #{ |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
65 \ length: 6, |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
66 \ type: 'popupMarker', |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
67 \ }) |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
68 let winid = popup_create('bottom left', #{ |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
69 \ pos: 'botleft', |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
70 \ textprop: 'popupMarker', |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
71 \ padding: [0,1,0,1], |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
72 \ }) |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
73 let winid = popup_create('bottom right', #{ |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
74 \ pos: 'botright', |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
75 \ textprop: 'popupMarker', |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
76 \ border: [], |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
77 \ padding: [0,1,0,1], |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
78 \ }) |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
79 let winid = popup_create('top left', #{ |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
80 \ pos: 'topleft', |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
81 \ textprop: 'popupMarker', |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
82 \ border: [], |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
83 \ padding: [0,1,0,1], |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
84 \ }) |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
85 let winid = popup_create('top right', #{ |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
86 \ pos: 'topright', |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
87 \ textprop: 'popupMarker', |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
88 \ padding: [0,1,0,1], |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
89 \ }) |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
90 END |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
91 call writefile(lines, 'XtestTextpropPopupCorners') |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
92 let buf = RunVimInTerminal('-S XtestTextpropPopupCorners', #{rows: 12}) |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
93 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_1', {}) |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
94 |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
95 call term_sendkeys(buf, "0dw") |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
96 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_2', {}) |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
97 |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
98 call term_sendkeys(buf, "46Goextra\<Esc>") |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
99 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_3', {}) |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
100 |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
101 call term_sendkeys(buf, "u") |
17877
642832e45388
patch 8.1.1935: test for text property popup window is flaky
Bram Moolenaar <Bram@vim.org>
parents:
17875
diff
changeset
|
102 call term_sendkeys(buf, ":\<CR>") |
17875
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
103 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_4', {}) |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
104 |
17879
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
105 call term_sendkeys(buf, ":vsplit foo\<CR>") |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
106 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_5', {}) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
107 |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
108 call term_sendkeys(buf, ":only!\<CR>") |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
109 call VerifyScreenDump(buf, 'Test_popup_textprop_corn_6', {}) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
110 |
17875
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
111 " clean up |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
112 call StopVimInTerminal(buf) |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
113 call delete('XtestTextpropPopupCorners') |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
114 endfunc |
f13a5c48320b
patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17865
diff
changeset
|
115 |
17879
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
116 func Test_textprop_popup_offsets() |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
117 let lines =<< trim END |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
118 call setline(1, range(1, 100)) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
119 call setline(50, 'now working with some longer text here') |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
120 50 |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
121 normal zz |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
122 set scrolloff=0 |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
123 call prop_type_add('popupMarker', #{highlight: 'DiffAdd'}) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
124 call prop_add(50, 23, #{ |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
125 \ length: 6, |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
126 \ type: 'popupMarker', |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
127 \ }) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
128 let winid = popup_create('bottom left', #{ |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
129 \ pos: 'botleft', |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
130 \ line: -1, |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
131 \ col: 2, |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
132 \ textprop: 'popupMarker', |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
133 \ padding: [0,1,0,1], |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
134 \ }) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
135 let winid = popup_create('bottom right', #{ |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
136 \ pos: 'botright', |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
137 \ line: -1, |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
138 \ col: -2, |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
139 \ textprop: 'popupMarker', |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
140 \ border: [], |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
141 \ padding: [0,1,0,1], |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
142 \ }) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
143 let winid = popup_create('top left', #{ |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
144 \ pos: 'topleft', |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
145 \ line: 1, |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
146 \ col: 2, |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
147 \ textprop: 'popupMarker', |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
148 \ border: [], |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
149 \ padding: [0,1,0,1], |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
150 \ }) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
151 let winid = popup_create('top right', #{ |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
152 \ pos: 'topright', |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
153 \ line: 1, |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
154 \ col: -2, |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
155 \ textprop: 'popupMarker', |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
156 \ padding: [0,1,0,1], |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
157 \ }) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
158 END |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
159 call writefile(lines, 'XtestTextpropPopupOffset') |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
160 let buf = RunVimInTerminal('-S XtestTextpropPopupOffset', #{rows: 12}) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
161 call VerifyScreenDump(buf, 'Test_popup_textprop_off_1', {}) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
162 |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
163 " test that removing the text property closes the popups |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
164 call term_sendkeys(buf, ":call prop_clear(50)\<CR>") |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
165 call VerifyScreenDump(buf, 'Test_popup_textprop_off_2', {}) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
166 |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
167 " clean up |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
168 call StopVimInTerminal(buf) |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
169 call delete('XtestTextpropPopupOffset') |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
170 endfunc |
5d5b460926ca
patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
17877
diff
changeset
|
171 |
17865
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
172 |
eaf8b21d80e7
patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff
changeset
|
173 " vim: shiftwidth=2 sts=2 |