forked from aniani/vim
Fix crash when using netbeans in a terminal when compiled with GUI support.
(partly by Xavier de Gaye)
This commit is contained in:
parent
9de9997949
commit
d54a688130
@ -185,8 +185,11 @@ netbeans_close(void)
|
|||||||
setcursor();
|
setcursor();
|
||||||
out_flush();
|
out_flush();
|
||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
gui_update_cursor(TRUE, FALSE);
|
if (gui.in_use)
|
||||||
gui_mch_flush();
|
{
|
||||||
|
gui_update_cursor(TRUE, FALSE);
|
||||||
|
gui_mch_flush();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1890,7 +1893,8 @@ nb_do_cmd(
|
|||||||
maketitle();
|
maketitle();
|
||||||
buf->insertDone = FALSE;
|
buf->insertDone = FALSE;
|
||||||
#if defined(FEAT_MENU) && defined(FEAT_GUI)
|
#if defined(FEAT_MENU) && defined(FEAT_GUI)
|
||||||
gui_update_menus(0);
|
if (gui.in_use)
|
||||||
|
gui_update_menus(0);
|
||||||
#endif
|
#endif
|
||||||
/* =====================================================================*/
|
/* =====================================================================*/
|
||||||
}
|
}
|
||||||
@ -2051,7 +2055,8 @@ nb_do_cmd(
|
|||||||
buf->bufp = curbuf;
|
buf->bufp = curbuf;
|
||||||
maketitle();
|
maketitle();
|
||||||
#if defined(FEAT_MENU) && defined(FEAT_GUI)
|
#if defined(FEAT_MENU) && defined(FEAT_GUI)
|
||||||
gui_update_menus(0);
|
if (gui.in_use)
|
||||||
|
gui_update_menus(0);
|
||||||
#endif
|
#endif
|
||||||
/* =====================================================================*/
|
/* =====================================================================*/
|
||||||
}
|
}
|
||||||
@ -2075,7 +2080,8 @@ nb_do_cmd(
|
|||||||
maketitle();
|
maketitle();
|
||||||
#endif
|
#endif
|
||||||
#if defined(FEAT_MENU) && defined(FEAT_GUI)
|
#if defined(FEAT_MENU) && defined(FEAT_GUI)
|
||||||
gui_update_menus(0);
|
if (gui.in_use)
|
||||||
|
gui_update_menus(0);
|
||||||
#endif
|
#endif
|
||||||
/* =====================================================================*/
|
/* =====================================================================*/
|
||||||
}
|
}
|
||||||
@ -2102,7 +2108,7 @@ nb_do_cmd(
|
|||||||
|
|
||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
/* Side effect!!!. */
|
/* Side effect!!!. */
|
||||||
if (!gui.starting)
|
if (gui.in_use)
|
||||||
gui_mch_set_foreground();
|
gui_mch_set_foreground();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -2112,7 +2118,7 @@ nb_do_cmd(
|
|||||||
{
|
{
|
||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
/* Bring gvim to the foreground. */
|
/* Bring gvim to the foreground. */
|
||||||
if (!gui.starting)
|
if (gui.in_use)
|
||||||
gui_mch_set_foreground();
|
gui_mch_set_foreground();
|
||||||
#endif
|
#endif
|
||||||
/* =====================================================================*/
|
/* =====================================================================*/
|
||||||
@ -2246,14 +2252,17 @@ nb_do_cmd(
|
|||||||
setcursor();
|
setcursor();
|
||||||
out_flush();
|
out_flush();
|
||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
gui_update_cursor(TRUE, FALSE);
|
if (gui.in_use)
|
||||||
gui_mch_flush();
|
{
|
||||||
|
gui_update_cursor(TRUE, FALSE);
|
||||||
|
gui_mch_flush();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
/* Quit a hit-return or more prompt. */
|
/* Quit a hit-return or more prompt. */
|
||||||
if (State == HITRETURN || State == ASKMORE)
|
if (State == HITRETURN || State == ASKMORE)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_GUI_GTK
|
#ifdef FEAT_GUI_GTK
|
||||||
if (gtk_main_level() > 0)
|
if (gui.in_use && gtk_main_level() > 0)
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -2637,14 +2646,17 @@ nb_do_cmd(
|
|||||||
setcursor();
|
setcursor();
|
||||||
out_flush();
|
out_flush();
|
||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
gui_update_cursor(TRUE, FALSE);
|
if (gui.in_use)
|
||||||
gui_mch_flush();
|
{
|
||||||
|
gui_update_cursor(TRUE, FALSE);
|
||||||
|
gui_mch_flush();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
/* Quit a hit-return or more prompt. */
|
/* Quit a hit-return or more prompt. */
|
||||||
if (State == HITRETURN || State == ASKMORE)
|
if (State == HITRETURN || State == ASKMORE)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_GUI_GTK
|
#ifdef FEAT_GUI_GTK
|
||||||
if (gtk_main_level() > 0)
|
if (gui.in_use && gtk_main_level() > 0)
|
||||||
gtk_main_quit();
|
gtk_main_quit();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -2689,8 +2701,11 @@ coloncmd(char *cmd, ...)
|
|||||||
out_flush(); /* make sure output has been written */
|
out_flush(); /* make sure output has been written */
|
||||||
|
|
||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
gui_update_cursor(TRUE, FALSE);
|
if (gui.in_use)
|
||||||
gui_mch_flush();
|
{
|
||||||
|
gui_update_cursor(TRUE, FALSE);
|
||||||
|
gui_mch_flush();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2987,8 +3002,11 @@ netbeans_open(char *params, int doabort)
|
|||||||
setcursor();
|
setcursor();
|
||||||
out_flush();
|
out_flush();
|
||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
gui_update_cursor(TRUE, FALSE);
|
if (gui.in_use)
|
||||||
gui_mch_flush();
|
{
|
||||||
|
gui_update_cursor(TRUE, FALSE);
|
||||||
|
gui_mch_flush();
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user