Mercurial > vim
comparison src/testdir/test_winbar.vim @ 28923:2d726d5a6405 v8.2.4984
patch 8.2.4984: dragging statusline fails for window with winbar
Commit: https://github.com/vim/vim/commit/6dab00aa5417f62f8c2c85c7c4ae871b4f1171f4
Author: zeertzjq <zeertzjq@outlook.com>
Date: Fri May 20 13:45:59 2022 +0100
patch 8.2.4984: dragging statusline fails for window with winbar
Problem: Dragging statusline fails for window with winbar.
Solution: Fix off-by-one error. (closes https://github.com/vim/vim/issues/10448)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 20 May 2022 15:00:05 +0200 |
parents | 8938c0c98149 |
children | bff3fa5f4c74 |
comparison
equal
deleted
inserted
replaced
28922:59caeb5508ac | 28923:2d726d5a6405 |
---|---|
159 " clean up | 159 " clean up |
160 call StopVimInTerminal(buf) | 160 call StopVimInTerminal(buf) |
161 call delete('XtestWinbarNotVisble') | 161 call delete('XtestWinbarNotVisble') |
162 endfunction | 162 endfunction |
163 | 163 |
164 func Test_drag_statusline_with_winbar() | |
165 call SetupWinbar() | |
166 let save_mouse = &mouse | |
167 set mouse=a | |
168 set laststatus=2 | |
169 | |
170 call test_setmouse(&lines - 1, 1) | |
171 call feedkeys("\<LeftMouse>", 'xt') | |
172 call test_setmouse(&lines - 2, 1) | |
173 call feedkeys("\<LeftDrag>", 'xt') | |
174 call assert_equal(2, &cmdheight) | |
175 | |
176 call test_setmouse(&lines - 2, 1) | |
177 call feedkeys("\<LeftMouse>", 'xt') | |
178 call test_setmouse(&lines - 3, 1) | |
179 call feedkeys("\<LeftDrag>", 'xt') | |
180 call assert_equal(3, &cmdheight) | |
181 | |
182 call test_setmouse(&lines - 3, 1) | |
183 call feedkeys("\<LeftMouse>", 'xt') | |
184 call test_setmouse(&lines - 1, 1) | |
185 call feedkeys("\<LeftDrag>", 'xt') | |
186 call assert_equal(1, &cmdheight) | |
187 | |
188 let &mouse = save_mouse | |
189 set laststatus& | |
190 endfunc | |
191 | |
164 " vim: shiftwidth=2 sts=2 expandtab | 192 " vim: shiftwidth=2 sts=2 expandtab |