diff options
author | zeertzjq <zeertzjq@outlook.com> | 2022-05-20 13:45:59 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-05-20 13:45:59 +0100 |
commit | 6dab00aa5417f62f8c2c85c7c4ae871b4f1171f4 (patch) | |
tree | 42b5898c0eeb45d5282aaff24d65dc30b34a1421 /src/testdir/test_winbar.vim | |
parent | b0855f5324b348921d412d97193e8c8bc3b5d1dd (diff) | |
download | vim-git-6dab00aa5417f62f8c2c85c7c4ae871b4f1171f4.tar.gz |
patch 8.2.4984: dragging statusline fails for window with winbarv8.2.4984
Problem: Dragging statusline fails for window with winbar.
Solution: Fix off-by-one error. (closes #10448)
Diffstat (limited to 'src/testdir/test_winbar.vim')
-rw-r--r-- | src/testdir/test_winbar.vim | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/testdir/test_winbar.vim b/src/testdir/test_winbar.vim index 92da3128f..7972bc3b6 100644 --- a/src/testdir/test_winbar.vim +++ b/src/testdir/test_winbar.vim @@ -161,4 +161,32 @@ func Test_winbar_not_visible_custom_statusline() call delete('XtestWinbarNotVisble') endfunction +func Test_drag_statusline_with_winbar() + call SetupWinbar() + let save_mouse = &mouse + set mouse=a + set laststatus=2 + + call test_setmouse(&lines - 1, 1) + call feedkeys("\<LeftMouse>", 'xt') + call test_setmouse(&lines - 2, 1) + call feedkeys("\<LeftDrag>", 'xt') + call assert_equal(2, &cmdheight) + + call test_setmouse(&lines - 2, 1) + call feedkeys("\<LeftMouse>", 'xt') + call test_setmouse(&lines - 3, 1) + call feedkeys("\<LeftDrag>", 'xt') + call assert_equal(3, &cmdheight) + + call test_setmouse(&lines - 3, 1) + call feedkeys("\<LeftMouse>", 'xt') + call test_setmouse(&lines - 1, 1) + call feedkeys("\<LeftDrag>", 'xt') + call assert_equal(1, &cmdheight) + + let &mouse = save_mouse + set laststatus& +endfunc + " vim: shiftwidth=2 sts=2 expandtab |