forked from aniani/vim
patch 9.1.1429: dragging outside the tabpanel changes tabpagenr
Problem: dragging outside the tabpanel changes tabpagenr (char101) Solution: set in_tab_line and in_tabpanel variables (Hirohito Higashi) fixes: #17385 closes: #17431 Signed-off-by: Hirohito Higashi <h.east.727@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
parent
86d46a7018
commit
a1522f7c0d
@ -337,7 +337,13 @@ do_mouse(
|
||||
|
||||
// Ignore drag and release events if we didn't get a click.
|
||||
if (is_click)
|
||||
{
|
||||
got_click = TRUE;
|
||||
in_tab_line = FALSE;
|
||||
#if defined(FEAT_TABPANEL)
|
||||
in_tabpanel = FALSE;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!got_click) // didn't get click, ignore
|
||||
|
@ -92,6 +92,13 @@ function Test_tabpanel_mouse()
|
||||
call feedkeys("\<LeftMouse>", 'xt')
|
||||
call assert_equal(3, tabpagenr())
|
||||
|
||||
" Confirm that tabpagenr() does not change when dragging outside the tabpanel
|
||||
call test_setmouse(3, 30)
|
||||
call feedkeys("\<LeftMouse>", 'xt')
|
||||
call test_setmouse(1, 30)
|
||||
call feedkeys("\<LeftDrag>", 'xt')
|
||||
call assert_equal(3, tabpagenr())
|
||||
|
||||
call feedkeys("\<LeftMouse>", 'xt')
|
||||
call test_setmouse(2, 3)
|
||||
let pos = getmousepos()
|
||||
|
@ -709,6 +709,8 @@ static char *(features[]) =
|
||||
|
||||
static int included_patches[] =
|
||||
{ /* Add new patch number below this line */
|
||||
/**/
|
||||
1429,
|
||||
/**/
|
||||
1428,
|
||||
/**/
|
||||
|
Loading…
x
Reference in New Issue
Block a user