To: vim_dev@googlegroups.com Subject: Patch 8.2.3681 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 8.2.3681 Problem: Cannot drag popup window after click on a status line. (Sergey Vlasov) Solution: Reset on_status_line. (closes #9221) Files: src/mouse.c, src/testdir/test_popupwin.vim, src/testdir/dumps/Test_popupwin_drag_04.dump *** ../vim-8.2.3680/src/mouse.c 2021-06-03 21:11:04.418516318 +0100 --- src/mouse.c 2021-11-26 15:56:28.874357561 +0000 *************** *** 1630,1635 **** --- 1630,1636 ---- 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)) { *** ../vim-8.2.3680/src/testdir/test_popupwin.vim 2021-11-17 20:39:29.135019718 +0000 --- src/testdir/test_popupwin.vim 2021-11-26 15:43:19.120174402 +0000 *************** *** 574,579 **** --- 574,586 ---- 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,590 **** --- 592,601 ---- 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') *** ../vim-8.2.3680/src/testdir/dumps/Test_popupwin_drag_04.dump 2021-11-26 15:57:07.230279738 +0000 --- src/testdir/dumps/Test_popupwin_drag_04.dump 2021-11-26 15:43:31.564140418 +0000 *************** *** 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 *** ../vim-8.2.3680/src/version.c 2021-11-26 13:59:22.533650233 +0000 --- src/version.c 2021-11-26 15:36:10.325566548 +0000 *************** *** 759,760 **** --- 759,762 ---- { /* Add new patch number below this line */ + /**/ + 3681, /**/ -- BEDEVERE: Stand by for attack!! [CUT TO enormous army forming up. Trebuchets, rows of PIKEMEN, siege towers, pennants flying, shouts of "Stand by for attack!" Traditional army build-up shots. The shouts echo across the ranks of the army. We see various groups reacting, and stirring themselves in readiness.] ARTHUR: Who are they? BEDEVERE: Oh, just some friends! "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///