Fix tab dragging not working when dragging a tab to the right

Vim's tabmove has two positions where it doesn't do anything, so need to
add 1 to index when moving tab to the right.

Fix #257
This commit is contained in:
Yee Cheng Chin
2018-11-24 04:12:03 -08:00
parent e126fa9652
commit 7e1b43e6c2
+8
View File
@@ -2013,6 +2013,14 @@ extern GuiFont gui_mch_retain_font(GuiFont font);
// based.
int idx = *((int*)bytes);
// Also, this index doesn't take itself into account, so if the move is
// to a later tab, need to add one to it since Vim's tabpage_move *does*
// count the current tab.
int curtab_index = tabpage_index(curtab);
if (idx >= curtab_index) {
idx += 1;
}
tabpage_move(idx);
} else if (SetTextDimensionsMsgID == msgid || LiveResizeMsgID == msgid
|| SetTextDimensionsNoResizeWindowMsgID == msgid