On Sat, Nov 8, 2008 at 2:24 PM, Bram Moolenaar <[EMAIL PROTECTED]> wrote:
>> > ...
>> > The place where you invoke mch_exit() looks a bit weird. Not sure if
>> > this is the best solution. And when compiled without GUI (e.g.,
>> > starting a small version of Vim) this exit won't be reached. Would
>> > someone only use -nb with gvim?
>> >
>> > The message should be defined in one place, not twice.
>>
>> Right of course. I will try sending another patch fixing these points.
>
> Good, thanks.
Attached is a patch that fixes the above issues. It's on top of
version 7.2.28 (subversion revision 1226).
>> BTW do you think an implementation of netbeans over Vim console is
>> acceptable as a Vim patch (as opposed to an external patch such as
>> those in http://groups.google.com/group/vim_dev/web/vim-patches).
>
> If you can make the netbeans interface work for a Vim running in a
> console, that sounds like a useful feature. I would include it if it
> works properly. However, some programs using the netbeans interface
> assume GUI features, such as menus. Thus it's probably only useful
> for some applications.
I will give it a try.
Xavier
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---
Index: main.c
===================================================================
--- main.c (revision 1226)
+++ main.c (working copy)
@@ -246,7 +246,7 @@
mch_exit(0);
TIME_MSG("Allocated generic buffers");
-#ifdef NBDEBUG
+#if defined(FEAT_NETBEANS_INTG) && defined(NBDEBUG)
/* Wait a moment for debugging NetBeans. Must be after allocating
* NameBuff. */
nbdebug_log_init("SPRO_GVIM_DEBUG", "SPRO_GVIM_DLEVEL");
@@ -274,6 +274,7 @@
* --server...
* --socketid
* --windowid
+ * -nb
*/
early_arg_scan(¶ms);
@@ -1503,13 +1504,15 @@
* argv[]. Used for the xterm-clipboard display.
*
* Also find the --server... arguments and --socketid and --windowid
+ * Also check -nb when netbeans_intg feature not compiled in
*/
/*ARGSUSED*/
static void
early_arg_scan(parmp)
mparm_T *parmp;
{
-#if defined(FEAT_XCLIPBOARD) || defined(FEAT_CLIENTSERVER)
+#if defined(FEAT_XCLIPBOARD) || defined(FEAT_CLIENTSERVER) \
+ || ! defined(FEAT_NETBEANS_INTG)
int argc = parmp->argc;
char **argv = parmp->argv;
int i;
@@ -1581,6 +1584,13 @@
else if (STRICMP(argv[i], "--echo-wid") == 0)
echo_wid_arg = TRUE;
# endif
+# ifndef FEAT_NETBEANS_INTG
+ else if (strstr(argv[i], "-nb") == argv[i])
+ {
+ mch_errmsg("'-nb' cannot be used: not enabled at compile time\n");
+ mch_exit(2);
+ }
+# endif
}
#endif
}
@@ -2308,7 +2318,7 @@
#endif
)
{
-#ifdef NBDEBUG
+#if defined(FEAT_NETBEANS_INTG) && defined(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