annotate src/testdir/test_winbar.vim @ 31859:8b15e4161605 v9.0.1262

patch 9.0.1262: the did_set_string_option function is too long Commit: https://github.com/vim/vim/commit/f2e30d0c448b9754d0d4daa901b51fbbf4c30747 Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Mon Jan 30 13:04:42 2023 +0000 patch 9.0.1262: the did_set_string_option function is too long Problem: The did_set_string_option function is too long. Solution: Split off functionality to individual functions. (Yegappan Lakshmanan, Lewis Russell, closes #11904)
author Bram Moolenaar <Bram@vim.org>
date Mon, 30 Jan 2023 14:15:05 +0100
parents 360f286b5869
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
12487
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " Test WinBar
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2
17089
8e9e9124c7a2 patch 8.1.1544: some balloon tests don't run when they can
Bram Moolenaar <Bram@vim.org>
parents: 17049
diff changeset
3 source check.vim
8e9e9124c7a2 patch 8.1.1544: some balloon tests don't run when they can
Bram Moolenaar <Bram@vim.org>
parents: 17049
diff changeset
4 CheckFeature menu
12487
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5
16525
1bf49cd87e6b patch 8.1.1266: winbar test doesn't test enough
Bram Moolenaar <Bram@vim.org>
parents: 16519
diff changeset
6 source shared.vim
24275
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
7 source screendump.vim
16525
1bf49cd87e6b patch 8.1.1266: winbar test doesn't test enough
Bram Moolenaar <Bram@vim.org>
parents: 16519
diff changeset
8
12487
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 func Test_add_remove_menu()
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 new
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11 amenu 1.10 WinBar.Next :let g:did_next = 11<CR>
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 amenu 1.20 WinBar.Cont :let g:did_cont = 12<CR>
16525
1bf49cd87e6b patch 8.1.1266: winbar test doesn't test enough
Bram Moolenaar <Bram@vim.org>
parents: 16519
diff changeset
13 redraw
1bf49cd87e6b patch 8.1.1266: winbar test doesn't test enough
Bram Moolenaar <Bram@vim.org>
parents: 16519
diff changeset
14 call assert_match('Next Cont', Screenline(1))
1bf49cd87e6b patch 8.1.1266: winbar test doesn't test enough
Bram Moolenaar <Bram@vim.org>
parents: 16519
diff changeset
15
12487
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 emenu WinBar.Next
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 call assert_equal(11, g:did_next)
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 emenu WinBar.Cont
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 call assert_equal(12, g:did_cont)
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 wincmd w
22087
ff21e2962490 patch 8.2.1593: tests do not check the error number properly
Bram Moolenaar <Bram@vim.org>
parents: 21765
diff changeset
22 call assert_fails('emenu WinBar.Next', 'E334:')
12487
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 wincmd p
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 aunmenu WinBar.Next
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 aunmenu WinBar.Cont
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 close
3f16cf18386c patch 8.0.1123: cannot define a toolbar for a window
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 endfunc
16519
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
29
16537
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
30 " Create a WinBar with three buttons.
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
31 " Columns of the button edges:
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
32 " _Next_ _Cont_ _Close_
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
33 " 2 7 10 15 18 24
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
34 func SetupWinbar()
16519
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
35 amenu 1.10 WinBar.Next :let g:did_next = 11<CR>
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
36 amenu 1.20 WinBar.Cont :let g:did_cont = 12<CR>
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
37 amenu 1.30 WinBar.Close :close<CR>
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
38 redraw
16525
1bf49cd87e6b patch 8.1.1266: winbar test doesn't test enough
Bram Moolenaar <Bram@vim.org>
parents: 16519
diff changeset
39 call assert_match('Next Cont Close', Screenline(1))
16537
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
40 endfunc
16519
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
41
16537
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
42 func Test_click_in_winbar()
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
43 new
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
44 call SetupWinbar()
16519
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
45 let save_mouse = &mouse
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
46 set mouse=a
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
47
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
48 let g:did_next = 0
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
49 let g:did_cont = 0
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
50 for col in [1, 8, 9, 16, 17, 25, 26]
16525
1bf49cd87e6b patch 8.1.1266: winbar test doesn't test enough
Bram Moolenaar <Bram@vim.org>
parents: 16519
diff changeset
51 call test_setmouse(1, col)
16519
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
52 call feedkeys("\<LeftMouse>", "xt")
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
53 call assert_equal(0, g:did_next, 'col ' .. col)
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
54 call assert_equal(0, g:did_cont, 'col ' .. col)
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
55 endfor
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
56
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
57 for col in range(2, 7)
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
58 let g:did_next = 0
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
59 call test_setmouse(1, col)
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
60 call feedkeys("\<LeftMouse>", "xt")
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
61 call assert_equal(11, g:did_next, 'col ' .. col)
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
62 endfor
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
63
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
64 for col in range(10, 15)
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
65 let g:did_cont = 0
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
66 call test_setmouse(1, col)
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
67 call feedkeys("\<LeftMouse>", "xt")
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
68 call assert_equal(12, g:did_cont, 'col ' .. col)
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
69 endfor
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
70
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
71 let wincount = winnr('$')
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
72 call test_setmouse(1, 20)
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
73 call feedkeys("\<LeftMouse>", "xt")
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
74 call assert_equal(wincount - 1, winnr('$'))
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
75
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
76 let &mouse = save_mouse
a147acab726f patch 8.1.1263: mouse clicks in WinBar not tested
Bram Moolenaar <Bram@vim.org>
parents: 12487
diff changeset
77 endfunc
16537
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
78
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
79 func Test_click_in_other_winbar()
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
80 new
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
81 call SetupWinbar()
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
82 let save_mouse = &mouse
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
83 set mouse=a
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
84 let winid = win_getid()
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
85
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
86 split
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
87 let [row, col] = win_screenpos(winid)
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
88
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
89 " Click on Next button in other window
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
90 let g:did_next = 0
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
91 call test_setmouse(row, 5)
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
92 call feedkeys("\<LeftMouse>", "xt")
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
93 call assert_equal(11, g:did_next)
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
94
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
95 " Click on Cont button in other window from Visual mode
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
96 let g:did_cont = 0
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
97 call setline(1, 'select XYZ here')
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
98 call test_setmouse(row, 12)
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
99 call feedkeys("0fXvfZ\<LeftMouse>x", "xt")
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
100 call assert_equal(12, g:did_cont)
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
101 call assert_equal('select here', getline(1))
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
102
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
103 " Click on Close button in other window
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
104 let wincount = winnr('$')
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
105 let winid = win_getid()
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
106 call test_setmouse(row, 20)
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
107 call feedkeys("\<LeftMouse>", "xt")
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
108 call assert_equal(wincount - 1, winnr('$'))
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
109 call assert_equal(winid, win_getid())
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
110
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
111 bwipe!
d9f659007109 patch 8.1.1272: click on WinBar of other window not tested
Bram Moolenaar <Bram@vim.org>
parents: 16525
diff changeset
112 endfunc
16910
6a99709c6ae3 patch 8.1.1456: WinBar not redrawn after scrolling one line
Bram Moolenaar <Bram@vim.org>
parents: 16537
diff changeset
113
6a99709c6ae3 patch 8.1.1456: WinBar not redrawn after scrolling one line
Bram Moolenaar <Bram@vim.org>
parents: 16537
diff changeset
114 func Test_redraw_after_scroll()
6a99709c6ae3 patch 8.1.1456: WinBar not redrawn after scrolling one line
Bram Moolenaar <Bram@vim.org>
parents: 16537
diff changeset
115 new
6a99709c6ae3 patch 8.1.1456: WinBar not redrawn after scrolling one line
Bram Moolenaar <Bram@vim.org>
parents: 16537
diff changeset
116 amenu 1.10 WinBar.Next :let g:did_next = 11<CR>
6a99709c6ae3 patch 8.1.1456: WinBar not redrawn after scrolling one line
Bram Moolenaar <Bram@vim.org>
parents: 16537
diff changeset
117 redraw
6a99709c6ae3 patch 8.1.1456: WinBar not redrawn after scrolling one line
Bram Moolenaar <Bram@vim.org>
parents: 16537
diff changeset
118 call assert_equal(" Next", Screenline(1))
6a99709c6ae3 patch 8.1.1456: WinBar not redrawn after scrolling one line
Bram Moolenaar <Bram@vim.org>
parents: 16537
diff changeset
119 echo "some\nmore"
6a99709c6ae3 patch 8.1.1456: WinBar not redrawn after scrolling one line
Bram Moolenaar <Bram@vim.org>
parents: 16537
diff changeset
120 redraw
6a99709c6ae3 patch 8.1.1456: WinBar not redrawn after scrolling one line
Bram Moolenaar <Bram@vim.org>
parents: 16537
diff changeset
121 call assert_equal(" Next", Screenline(1))
6a99709c6ae3 patch 8.1.1456: WinBar not redrawn after scrolling one line
Bram Moolenaar <Bram@vim.org>
parents: 16537
diff changeset
122 bwipe!
6a99709c6ae3 patch 8.1.1456: WinBar not redrawn after scrolling one line
Bram Moolenaar <Bram@vim.org>
parents: 16537
diff changeset
123 endfunc
6a99709c6ae3 patch 8.1.1456: WinBar not redrawn after scrolling one line
Bram Moolenaar <Bram@vim.org>
parents: 16537
diff changeset
124
24275
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
125 func Test_winbar_not_visible()
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
126 CheckScreendump
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
127
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
128 let lines =<< trim END
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
129 split
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
130 nnoremenu WinBar.Test :test
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
131 set winminheight=0
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
132 wincmd j
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
133 wincmd _
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
134 END
30986
360f286b5869 patch 9.0.0828: various typos
Bram Moolenaar <Bram@vim.org>
parents: 30869
diff changeset
135 call writefile(lines, 'XtestWinbarNotVisible', 'D')
360f286b5869 patch 9.0.0828: various typos
Bram Moolenaar <Bram@vim.org>
parents: 30869
diff changeset
136 let buf = RunVimInTerminal('-S XtestWinbarNotVisible', #{rows: 10})
24275
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
137 call VerifyScreenDump(buf, 'Test_winbar_not_visible', {})
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
138
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
139 " clean up
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
140 call StopVimInTerminal(buf)
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
141 endfunction
6062e10a7e72 patch 8.2.2679: status line missing for non-current window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 22087
diff changeset
142
24289
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
143 func Test_winbar_not_visible_custom_statusline()
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
144 CheckScreendump
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
145
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
146 let lines =<< trim END
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
147 split
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
148 nnoremenu WinBar.Test :test
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
149 set winminheight=0
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
150 set statusline=abcde
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
151 wincmd j
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
152 wincmd _
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
153 END
30986
360f286b5869 patch 9.0.0828: various typos
Bram Moolenaar <Bram@vim.org>
parents: 30869
diff changeset
154 call writefile(lines, 'XtestWinbarNotVisible', 'D')
360f286b5869 patch 9.0.0828: various typos
Bram Moolenaar <Bram@vim.org>
parents: 30869
diff changeset
155 let buf = RunVimInTerminal('-S XtestWinbarNotVisible', #{rows: 10})
24289
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
156 call VerifyScreenDump(buf, 'Test_winbar_not_visible_custom_statusline', {})
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
157
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
158 " clean up
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
159 call StopVimInTerminal(buf)
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
160 endfunction
8938c0c98149 patch 8.2.2685: custom statusline not drawn correctly with WinBar
Bram Moolenaar <Bram@vim.org>
parents: 24275
diff changeset
161
28923
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
162 func Test_drag_statusline_with_winbar()
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
163 call SetupWinbar()
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
164 let save_mouse = &mouse
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
165 set mouse=a
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
166 set laststatus=2
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
167
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
168 call test_setmouse(&lines - 1, 1)
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
169 call feedkeys("\<LeftMouse>", 'xt')
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
170 call test_setmouse(&lines - 2, 1)
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
171 call feedkeys("\<LeftDrag>", 'xt')
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
172 call assert_equal(2, &cmdheight)
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
173
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
174 call test_setmouse(&lines - 2, 1)
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
175 call feedkeys("\<LeftMouse>", 'xt')
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
176 call test_setmouse(&lines - 3, 1)
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
177 call feedkeys("\<LeftDrag>", 'xt')
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
178 call assert_equal(3, &cmdheight)
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
179
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
180 call test_setmouse(&lines - 3, 1)
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
181 call feedkeys("\<LeftMouse>", 'xt')
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
182 call test_setmouse(&lines - 1, 1)
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
183 call feedkeys("\<LeftDrag>", 'xt')
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
184 call assert_equal(1, &cmdheight)
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
185
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
186 let &mouse = save_mouse
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
187 set laststatus&
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
188 endfunc
2d726d5a6405 patch 8.2.4984: dragging statusline fails for window with winbar
Bram Moolenaar <Bram@vim.org>
parents: 24289
diff changeset
189
21765
08940efa6b4e patch 8.2.1432: various inconsistencies in test files
Bram Moolenaar <Bram@vim.org>
parents: 17089
diff changeset
190 " vim: shiftwidth=2 sts=2 expandtab