vim-patch:9.0.0825: cannot drag an entry in the tabpage line

Problem:    Cannot drag an entry in the tabpage line.
Solution:   Clear dragwin instead of got_click. (closes vim/vim#11483,
            closes vim/vim#11482)

8e0ccb6bc2

Omit Test_term_mouse_drag_to_move_tab(): covered by ui/mouse_spec.lua.
This commit is contained in:
zeertzjq
2022-11-02 08:04:00 +08:00
parent 39f85cdf6b
commit 419ee612e6
2 changed files with 21 additions and 21 deletions

View File

@@ -4214,7 +4214,7 @@ static int leave_tabpage(buf_T *new_curbuf, bool trigger_leave_autocmds)
}
}
reset_mouse_got_click();
reset_dragwin();
tp->tp_curwin = curwin;
tp->tp_prevwin = prevwin;
tp->tp_firstwin = firstwin;
@@ -4279,7 +4279,7 @@ static void enter_tabpage(tabpage_T *tp, buf_T *old_curbuf, bool trigger_enter_a
// If there was a click in a window, it won't be usable for a following
// drag.
reset_mouse_got_click();
reset_dragwin();
// The tabpage line may have appeared or disappeared, may need to resize the frames for that.
// When the Vim window was resized or ROWS_AVAIL changed need to update frame sizes too.