# HG changeset patch # User Bram Moolenaar # Date 1637942404 -3600 # Node ID 0374f55a16be0ea2d56c9fca0992b762b88c2b4a # Parent 7598fb8825d25e4fa51f98bcf12687d2f9cbd3a0 patch 8.2.3681: cannot drag popup window after click on a status line Commit: https://github.com/vim/vim/commit/bfc5786a61693aaadc3e45f80a2f147c3a6711a3 Author: Bram Moolenaar Date: Fri Nov 26 15:57:40 2021 +0000 patch 8.2.3681: cannot drag popup window after click on a status line Problem: Cannot drag popup window after click on a status line. (Sergey Vlasov) Solution: Reset on_status_line. (closes #9221) diff --git a/src/mouse.c b/src/mouse.c --- a/src/mouse.c +++ b/src/mouse.c @@ -1630,6 +1630,7 @@ retnomove: if (WIN_IS_POPUP(wp)) { on_sep_line = 0; + on_status_line = 0; in_popup_win = TRUE; if (which_button == MOUSE_LEFT && popup_close_if_on_X(wp, row, col)) { diff --git a/src/testdir/dumps/Test_popupwin_drag_04.dump b/src/testdir/dumps/Test_popupwin_drag_04.dump new file mode 100644 --- /dev/null +++ b/src/testdir/dumps/Test_popupwin_drag_04.dump @@ -0,0 +1,10 @@ +>1+0&#ffffff0| @35||+1&&|1+0&&| @35 +|2| @15|╔+0#0000001#ffd7ff255|═@9|╗| +0#0000000#ffffff0@7||+1&&|2+0&&| @35 +|3| @15|║+0#0000001#ffd7ff255|1@3| @5|║| +0#0000000#ffffff0@7||+1&&|3+0&&| @35 +|4| @15|║+0#0000001#ffd7ff255|2@5| @3|║| +0#0000000#ffffff0@7||+1&&|4+0&&| @35 +|[+3&&|N|o| |N|a|m|e|]| |[|+|]| @3|║+0#0000001#ffd7ff255|3@4| @4|║| +3#0000000#ffffff0@4|T|o|p| |[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|T|o|p +|1+0&&| @15|║+0#0000001#ffd7ff255| +0#4040ff13&@9|║+0#0000001&| +0#0000000#ffffff0@7||+1&&|1+0&&| @35 +|2| @15|╚+0#0000001#ffd7ff255|═@9|⇲| +0#0000000#ffffff0@7||+1&&|2+0&&| @35 +|3| @35||+1&&|3+0&&| @35 +|[+1&&|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|T|o|p| |[|N|o| |N|a|m|e|]| |[|+|]| @5|1|,|1| @11|T|o|p +|:+0&&|c|a|l@1| |C|l|i|c|k|A|n|d|D|r|a|g|(|)| @54 diff --git a/src/testdir/test_popupwin.vim b/src/testdir/test_popupwin.vim --- a/src/testdir/test_popupwin.vim +++ b/src/testdir/test_popupwin.vim @@ -574,6 +574,13 @@ func Test_popup_drag() endfunc map :call test_setmouse(6, 21) map :call test_setmouse(7, 25) + func ClickAndDrag() + call feedkeys("\\\", "xt") + call feedkeys("\\\\\", "xt") + endfunc + map :call test_setmouse(5, 2) + map :call test_setmouse(3, 14) + map :call test_setmouse(3, 18) END call writefile(lines, 'XtestPopupDrag') let buf = RunVimInTerminal('-S XtestPopupDrag', #{rows: 10}) @@ -585,6 +592,10 @@ func Test_popup_drag() call term_sendkeys(buf, ":call Resize()\") call VerifyScreenDump(buf, 'Test_popupwin_drag_03', {}) + " dragging works after click on a status line + call term_sendkeys(buf, ":call ClickAndDrag()\") + call VerifyScreenDump(buf, 'Test_popupwin_drag_04', {}) + " clean up call StopVimInTerminal(buf) call delete('XtestPopupDrag') diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -758,6 +758,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 3681, +/**/ 3680, /**/ 3679,