annotate src/testdir/test_popupwin_textprop.vim @ 27662:21654b0c1a95

Added tag v8.2.4356 for changeset 2062de7c0edd612bc92267482bd2c97bf8de2350
author Bram Moolenaar <Bram@vim.org>
date Sat, 12 Feb 2022 13:15:03 +0100
parents 49b78d6465e5
children 457ea0570b6f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
18763
49b78d6465e5 patch 8.1.2371: FEAT_TEXT_PROP is a confusing name
Bram Moolenaar <Bram@vim.org>
parents: 18629
diff changeset
4 CheckFeature popupwin
17865
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
5 CheckFeature textprop
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
6
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
7 source screendump.vim
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
8 CheckScreendump
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
9
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
10 func Test_textprop_popup()
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
11 let lines =<< trim END
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
12 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
13 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
14 50
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
15 normal zz
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
16 set scrolloff=0
18629
15fe2bd478b0 patch 8.1.2307: positioning popup doesn't work for buffer-local textprop
Bram Moolenaar <Bram@vim.org>
parents: 17879
diff changeset
17 call prop_type_add('popupMarker', #{highlight: 'DiffAdd', bufnr: bufnr('%')})
17865
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
18 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
19 \ length: 7,
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
20 \ type: 'popupMarker',
18629
15fe2bd478b0 patch 8.1.2307: positioning popup doesn't work for buffer-local textprop
Bram Moolenaar <Bram@vim.org>
parents: 17879
diff changeset
21 \ bufnr: bufnr('%'),
17865
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
22 \ })
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
23 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
24 \ pos: 'botleft',
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
25 \ textprop: 'popupMarker',
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
26 \ border: [],
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
27 \ 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
28 \ close: 'click',
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
29 \ })
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
30 END
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
31 call writefile(lines, 'XtestTextpropPopup')
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
32 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
33 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
34
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
35 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
36 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
37
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
38 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
39 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
40
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
41 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
42 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
43
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
44 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
45 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
46
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
47 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
48 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
49
17879
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
50 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
51 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
52
17865
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
53 " clean up
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
54 call StopVimInTerminal(buf)
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
55 call delete('XtestTextpropPopup')
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56 endfunc
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
57
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
58 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
59 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
60 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
61 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
62 50
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
63 normal zz
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
64 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
65 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
66 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
67 \ length: 6,
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
68 \ type: 'popupMarker',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
69 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
70 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
71 \ pos: 'botleft',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
72 \ textprop: 'popupMarker',
18629
15fe2bd478b0 patch 8.1.2307: positioning popup doesn't work for buffer-local textprop
Bram Moolenaar <Bram@vim.org>
parents: 17879
diff changeset
73 \ textpropwin: win_getid(),
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
74 \ 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
75 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
76 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
77 \ pos: 'botright',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
78 \ textprop: 'popupMarker',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
79 \ border: [],
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
80 \ 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
81 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
82 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
83 \ pos: 'topleft',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
84 \ textprop: 'popupMarker',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
85 \ border: [],
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
86 \ 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
87 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
88 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
89 \ pos: 'topright',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
90 \ textprop: 'popupMarker',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
91 \ 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
92 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
93 END
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
94 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
95 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
96 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
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, "0dw")
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_2', {})
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, "46Goextra\<Esc>")
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
102 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
103
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
104 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
105 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
106 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
107
17879
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, ":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
109 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
110
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
111 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
112 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
113
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
114 " clean up
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
115 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
116 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
117 endfunc
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
118
17879
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
119 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
120 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
121 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
122 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
123 50
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
124 normal zz
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
125 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
126 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
127 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
128 \ length: 6,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
129 \ type: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
130 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
131 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
132 \ pos: 'botleft',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
133 \ line: -1,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
134 \ col: 2,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
135 \ textprop: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
136 \ 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
137 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
138 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
139 \ pos: 'botright',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
140 \ line: -1,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
141 \ col: -2,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
142 \ textprop: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
143 \ border: [],
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
144 \ 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
145 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
146 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
147 \ pos: 'topleft',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
148 \ line: 1,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
149 \ col: 2,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
150 \ textprop: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
151 \ border: [],
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
152 \ 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
153 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
154 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
155 \ pos: 'topright',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
156 \ line: 1,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
157 \ col: -2,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
158 \ textprop: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
159 \ 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
160 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
161 END
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
162 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
163 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
164 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
165
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
166 " 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
167 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
168 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
169
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
170 " clean up
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
171 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
172 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
173 endfunc
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
174
17865
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
175
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
176 " vim: shiftwidth=2 sts=2