diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/eval.c | 4 | ||||
-rw-r--r-- | src/ex_cmds.c | 4 | ||||
-rw-r--r-- | src/ex_cmds.h | 2 | ||||
-rw-r--r-- | src/gui_gtk_x11.c | 5 | ||||
-rw-r--r-- | src/gui_x11.c | 4 | ||||
-rw-r--r-- | src/main.c | 14 | ||||
-rw-r--r-- | src/memline.c | 8 |
7 files changed, 26 insertions, 15 deletions
diff --git a/src/eval.c b/src/eval.c index 8416b578f..88b954971 100644 --- a/src/eval.c +++ b/src/eval.c @@ -5571,6 +5571,10 @@ f_has(argvars, retvar) else if (STRICMP(name, "win95") == 0) n = mch_windows95(); #endif +#ifdef FEAT_NETBEANS_INTG + else if (STRICMP(name, "netbeans_enabled") == 0) + n = usingNetbeans; +#endif } retvar->var_val.var_number = n; diff --git a/src/ex_cmds.c b/src/ex_cmds.c index b462e1f6e..7ed48b967 100644 --- a/src/ex_cmds.c +++ b/src/ex_cmds.c @@ -3208,8 +3208,8 @@ do_ecmd(fnum, ffname, sfname, eap, newlnum, flags) workshop_file_opened((char *)curbuf->b_ffname, curbuf->b_p_ro); # endif # ifdef FEAT_NETBEANS_INTG - if (usingNetbeans) - netbeans_file_opened((char *)curbuf->b_ffname); + if (usingNetbeans & ((flags & ECMD_SET_HELP) != ECMD_SET_HELP)) + netbeans_file_opened(curbuf); # endif } #endif diff --git a/src/ex_cmds.h b/src/ex_cmds.h index af76d734b..5d0f0819b 100644 --- a/src/ex_cmds.h +++ b/src/ex_cmds.h @@ -524,6 +524,8 @@ EX(CMD_mzfile, "mzfile", ex_mzfile, RANGE|FILE1|NEEDARG|CMDWIN), EX(CMD_next, "next", ex_next, RANGE|NOTADR|BANG|FILES|EDITCMD|ARGOPT|TRLBAR), +EX(CMD_nbkey, "nbkey", ex_nbkey, + EXTRA|NOTADR|NEEDARG), EX(CMD_new, "new", ex_splitview, BANG|FILE1|RANGE|NOTADR|EDITCMD|ARGOPT|TRLBAR), EX(CMD_nmap, "nmap", ex_map, diff --git a/src/gui_gtk_x11.c b/src/gui_gtk_x11.c index bc727733f..6d6d55d09 100644 --- a/src/gui_gtk_x11.c +++ b/src/gui_gtk_x11.c @@ -3309,11 +3309,6 @@ gui_mch_init(void) /* Pretend we don't have input focus, we will get an event if we do. */ gui.in_focus = FALSE; -#ifdef FEAT_NETBEANS_INTG - if (usingNetbeans) - netbeans_gtk_connect(); -# endif - return OK; } diff --git a/src/gui_x11.c b/src/gui_x11.c index 7087e0208..e57bb9279 100644 --- a/src/gui_x11.c +++ b/src/gui_x11.c @@ -1540,10 +1540,6 @@ gui_mch_init() if (usingSunWorkShop) workshop_connect(app_context); #endif -#ifdef FEAT_NETBEANS_INTG - if (usingNetbeans) - netbeans_Xt_connect(app_context); -#endif #ifdef FEAT_BEVAL gui_init_tooltip_font(); diff --git a/src/main.c b/src/main.c index 0f63d7848..3976a4433 100644 --- a/src/main.c +++ b/src/main.c @@ -1255,6 +1255,20 @@ scripterror: #endif ) { +#ifdef NBDEBUG + /* + * This shouldn't be necessary. But if I run netbeans with the log + * output coming to the console and XOpenDisplay fails, I get vim + * trying to start with input/output to my console tty. This fills my + * input buffer so fast I can't even kill the process in under 2 + * minutes (and it beeps continuosly the whole time :-) + */ + if (usingNetbeans && (!stdout_isatty || !input_isatty)) + { + mch_errmsg(_("Vim: Error: Failure to start gvim from NetBeans\n")); + exit(1); + } +#endif if (!stdout_isatty) mch_errmsg(_("Vim: Warning: Output is not to a terminal\n")); if (!input_isatty) diff --git a/src/memline.c b/src/memline.c index 67d233b9e..a3bd9d7be 100644 --- a/src/memline.c +++ b/src/memline.c @@ -2462,8 +2462,8 @@ ml_append_int(buf, lnum, line, len, newfile, mark) if (usingNetbeans) { if (STRLEN(line) > 0) - netbeans_inserted(buf, lnum+1, (colnr_T)0, 0, line, STRLEN(line)); - netbeans_inserted(buf, lnum+1, (colnr_T)STRLEN(line), 0, + netbeans_inserted(buf, lnum+1, (colnr_T)0, line, STRLEN(line)); + netbeans_inserted(buf, lnum+1, (colnr_T)STRLEN(line), (char_u *)"\n", 1); } #endif @@ -2500,7 +2500,7 @@ ml_replace(lnum, line, copy) if (usingNetbeans) { netbeans_removed(curbuf, lnum, 0, (long)STRLEN(ml_get(lnum))); - netbeans_inserted(curbuf, lnum, 0, 0, line, STRLEN(line)); + netbeans_inserted(curbuf, lnum, 0, line, STRLEN(line)); } #endif if (curbuf->b_ml.ml_line_lnum != lnum) /* other line buffered */ @@ -2605,7 +2605,7 @@ ml_delete_int(buf, lnum, message) #ifdef FEAT_NETBEANS_INTG if (usingNetbeans) - netbeans_removed(buf, lnum, 0, line_size); + netbeans_removed(buf, lnum, 0, (long)line_size); #endif /* |