mirror of
https://github.com/vim/vim.git
synced 2025-07-26 11:04:33 -04:00
patch 8.2.4621: crash when using the tabline right-click menu
Problem: Crash when using the tabline right-click menu. Solution: Use XtPointer for XmNuserData. (closes #10009)
This commit is contained in:
parent
1e2c4175dc
commit
9dd42a6311
@ -142,12 +142,12 @@ tabline_button_cb(
|
|||||||
XtPointer client_data UNUSED,
|
XtPointer client_data UNUSED,
|
||||||
XtPointer call_data UNUSED)
|
XtPointer call_data UNUSED)
|
||||||
{
|
{
|
||||||
int cmd, tab_idx;
|
XtPointer cmd, tab_idx;
|
||||||
|
|
||||||
XtVaGetValues(w, XmNuserData, &cmd, NULL);
|
XtVaGetValues(w, XmNuserData, &cmd, NULL);
|
||||||
XtVaGetValues(tabLine_menu, XmNuserData, &tab_idx, NULL);
|
XtVaGetValues(tabLine_menu, XmNuserData, &tab_idx, NULL);
|
||||||
|
|
||||||
send_tabline_menu_event(tab_idx, cmd);
|
send_tabline_menu_event((int)(long)tab_idx, (int)(long)cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -254,7 +254,7 @@ tabline_menu_cb(
|
|||||||
XtVaGetValues(tab_w, XmNpageNumber, &tab_idx, NULL);
|
XtVaGetValues(tab_w, XmNpageNumber, &tab_idx, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
XtVaSetValues(tabLine_menu, XmNuserData, tab_idx, NULL);
|
XtVaSetValues(tabLine_menu, XmNuserData, (XtPointer)(long)tab_idx, NULL);
|
||||||
XtVaGetValues(tabLine_menu, XmNchildren, &children, XmNnumChildren,
|
XtVaGetValues(tabLine_menu, XmNchildren, &children, XmNnumChildren,
|
||||||
&numChildren, NULL);
|
&numChildren, NULL);
|
||||||
XtManageChildren(children, numChildren);
|
XtManageChildren(children, numChildren);
|
||||||
@ -517,7 +517,7 @@ gui_x11_create_widgets(void)
|
|||||||
|
|
||||||
// Add the buttons to the tabline popup menu
|
// Add the buttons to the tabline popup menu
|
||||||
n = 0;
|
n = 0;
|
||||||
XtSetArg(args[n], XmNuserData, TABLINE_MENU_CLOSE); n++;
|
XtSetArg(args[n], XmNuserData, (XtPointer)TABLINE_MENU_CLOSE); n++;
|
||||||
xms = XmStringCreate((char *)"Close tab", STRING_TAG);
|
xms = XmStringCreate((char *)"Close tab", STRING_TAG);
|
||||||
XtSetArg(args[n], XmNlabelString, xms); n++;
|
XtSetArg(args[n], XmNlabelString, xms); n++;
|
||||||
button = XmCreatePushButton(tabLine_menu, "Close", args, n);
|
button = XmCreatePushButton(tabLine_menu, "Close", args, n);
|
||||||
@ -526,7 +526,7 @@ gui_x11_create_widgets(void)
|
|||||||
XmStringFree(xms);
|
XmStringFree(xms);
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
XtSetArg(args[n], XmNuserData, TABLINE_MENU_NEW); n++;
|
XtSetArg(args[n], XmNuserData, (XtPointer)TABLINE_MENU_NEW); n++;
|
||||||
xms = XmStringCreate((char *)"New Tab", STRING_TAG);
|
xms = XmStringCreate((char *)"New Tab", STRING_TAG);
|
||||||
XtSetArg(args[n], XmNlabelString, xms); n++;
|
XtSetArg(args[n], XmNlabelString, xms); n++;
|
||||||
button = XmCreatePushButton(tabLine_menu, "New Tab", args, n);
|
button = XmCreatePushButton(tabLine_menu, "New Tab", args, n);
|
||||||
@ -535,7 +535,7 @@ gui_x11_create_widgets(void)
|
|||||||
XmStringFree(xms);
|
XmStringFree(xms);
|
||||||
|
|
||||||
n = 0;
|
n = 0;
|
||||||
XtSetArg(args[n], XmNuserData, TABLINE_MENU_OPEN); n++;
|
XtSetArg(args[n], XmNuserData, (XtPointer)TABLINE_MENU_OPEN); n++;
|
||||||
xms = XmStringCreate((char *)"Open tab...", STRING_TAG);
|
xms = XmStringCreate((char *)"Open tab...", STRING_TAG);
|
||||||
XtSetArg(args[n], XmNlabelString, xms); n++;
|
XtSetArg(args[n], XmNlabelString, xms); n++;
|
||||||
button = XmCreatePushButton(tabLine_menu, "Open tab...", args, n);
|
button = XmCreatePushButton(tabLine_menu, "Open tab...", args, n);
|
||||||
|
@ -750,6 +750,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
4621,
|
||||||
/**/
|
/**/
|
||||||
4620,
|
4620,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user