annotate src/testdir/test_popupwin_textprop.vim @ 31081:c12069d28719 v9.0.0875

patch 9.0.0875: using freed memory when executing delfunc at more prompt Commit: https://github.com/vim/vim/commit/398a26f7fcd58fbc6e2329f892edbb7479a971bb Author: Bram Moolenaar <Bram@vim.org> Date: Sun Nov 13 22:13:33 2022 +0000 patch 9.0.0875: using freed memory when executing delfunc at more prompt Problem: Using freed memory when executing delfunc at the more prompt. Solution: Check function list not changed in another place. (closes https://github.com/vim/vim/issues/11437)
author Bram Moolenaar <Bram@vim.org>
date Sun, 13 Nov 2022 23:15:03 +0100
parents 457ea0570b6f
children dbec60b8c253
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
30592
457ea0570b6f patch 9.0.0631: too many delete() calls in tests
Bram Moolenaar <Bram@vim.org>
parents: 18763
diff changeset
31 call writefile(lines, 'XtestTextpropPopup', 'D')
17865
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 endfunc
eaf8b21d80e7 patch 8.1.1929: no tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents:
diff changeset
56
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
57 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
58 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
59 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
60 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
61 50
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
62 normal zz
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
63 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
64 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
65 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
66 \ length: 6,
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
67 \ type: 'popupMarker',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
68 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
69 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
70 \ pos: 'botleft',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
71 \ 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
72 \ 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
73 \ 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
74 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
75 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
76 \ pos: 'botright',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
77 \ textprop: 'popupMarker',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
78 \ border: [],
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
79 \ 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
80 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
81 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
82 \ pos: 'topleft',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
83 \ textprop: 'popupMarker',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
84 \ border: [],
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
85 \ 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
86 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
87 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
88 \ pos: 'topright',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
89 \ textprop: 'popupMarker',
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
90 \ 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
91 \ })
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
92 END
30592
457ea0570b6f patch 9.0.0631: too many delete() calls in tests
Bram Moolenaar <Bram@vim.org>
parents: 18763
diff changeset
93 call writefile(lines, 'XtestTextpropPopupCorners', 'D')
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
94 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
95 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
96
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
97 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
98 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
99
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
100 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
101 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
102
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
103 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
104 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
105 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
106
17879
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
107 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
108 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
109
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
110 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
111 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
112
17875
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
113 " clean up
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
114 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
115 endfunc
f13a5c48320b patch 8.1.1934: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17865
diff changeset
116
17879
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
117 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
118 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
119 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
120 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
121 50
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
122 normal zz
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
123 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
124 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
125 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
126 \ length: 6,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
127 \ type: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
128 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
129 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
130 \ pos: 'botleft',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
131 \ line: -1,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
132 \ col: 2,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
133 \ textprop: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
134 \ 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
135 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
136 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
137 \ pos: 'botright',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
138 \ line: -1,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
139 \ col: -2,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
140 \ textprop: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
141 \ border: [],
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
142 \ 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
143 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
144 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
145 \ pos: 'topleft',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
146 \ line: 1,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
147 \ col: 2,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
148 \ textprop: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
149 \ border: [],
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
150 \ 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
151 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
152 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
153 \ pos: 'topright',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
154 \ line: 1,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
155 \ col: -2,
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
156 \ textprop: 'popupMarker',
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
157 \ 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
158 \ })
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
159 END
30592
457ea0570b6f patch 9.0.0631: too many delete() calls in tests
Bram Moolenaar <Bram@vim.org>
parents: 18763
diff changeset
160 call writefile(lines, 'XtestTextpropPopupOffset', 'D')
17879
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
161 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
162 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
163
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
164 " 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
165 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
166 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
167
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
168 " clean up
5d5b460926ca patch 8.1.1936: not enough tests for text property popup window
Bram Moolenaar <Bram@vim.org>
parents: 17877
diff changeset
169 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
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