]> granicus.if.org Git - vim/commitdiff
updated for version 7.3.346 v7.3.346
authorBram Moolenaar <Bram@vim.org>
Thu, 20 Oct 2011 19:58:34 +0000 (21:58 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 20 Oct 2011 19:58:34 +0000 (21:58 +0200)
Problem:    It's hard to test netbeans commands.
Solution:   Process netbeans commands after :sleep. (Xavier de Gaye)

runtime/doc/netbeans.txt
src/ex_docmd.c
src/netbeans.c
src/version.c

index 6b186b3443df0a54fbc4b251709eb6dfd4014bb0..8798ee1340ba263e8ea210c30c5f5e285fba97f7 100644 (file)
@@ -263,6 +263,12 @@ The messages are currently sent over a socket.  Since the messages are in
 plain UTF-8 text this protocol could also be used with any other communication
 mechanism.
 
+Netbeans messages are processed when Vim is idle, waiting for user input.
+When Vim is run in non-interactive mode, for example when running an automated
+test case that sources a Vim script, the idle loop may not be called often
+enough. In that case, insert |sleep| commands in the Vim script. The |sleep|
+command does invoke Netbeans messages processing.
+
 6.1 Kinds of messages          |nb-messages|
 6.2 Terms                      |nb-terms|
 6.3 Commands                   |nb-commands|
@@ -833,11 +839,16 @@ These errors occur when a message violates the protocol:
                        signs.
 
                                                        *:nbkey*
-:nb[key] {key}         Pass the {key} to the Vim Controller for processing
-
-When a hot-key has been installed with the specialKeys command, this command
-can be used to generate a hotkey messages to the Vim Controller. The events
-newDotAndMark, keyCommand and keyAtPos are generated (in this order).
+:nb[key] {key}         Pass the {key} to the Vim Controller for processing.
+                       When a hot-key has been installed with the specialKeys
+                       command, this command can be used to generate a hotkey
+                       message to the Vim Controller.
+                       This command can also be used to pass any text to the
+                       Vim  Controller. It is used by Pyclewn, for example,
+                       to build the complete set of gdb commands as Vim user
+                       commands.
+                       The events newDotAndMark, keyCommand and keyAtPos are
+                       generated (in this order).
 
 
 ==============================================================================
index 3008a1d347b82e8ce8b26b689f2f4c20e932bbc6..68b530a22f6b1a9290aedc36af1df365b109a523 100644 (file)
@@ -8205,6 +8205,12 @@ do_sleep(msec)
     {
        ui_delay(msec - done > 1000L ? 1000L : msec - done, TRUE);
        ui_breakcheck();
+#ifdef FEAT_NETBEANS_INTG
+       /* Process the netbeans messages that may have been received in the
+        * call to ui_breakcheck() when the GUI is in use. This may occur when
+        * running a test case. */
+       netbeans_parse_messages();
+#endif
     }
 }
 
index 5b9161d82b004dfeaf0e32fa74a37adf0e8f6d39..59348f0288e92cc6dce823048ff20b016d0e4dd5 100644 (file)
  * which are *between* characters, whereas vim uses line number
  * and column number which are *on* characters.
  * See ":help netbeans-protocol" for explanation.
+ *
+ * The Netbeans messages are received and queued in the gui event loop, or in
+ * the select loop when Vim runs in a terminal. These messages are processed
+ * by netbeans_parse_messages() which is invoked in the idle loop when Vim is
+ * waiting for user input. The function netbeans_parse_messages() is also
+ * called from the ":sleep" command, to allow the execution of test cases that
+ * may not invoke the idle loop.
  */
 
 #include "vim.h"
index 01ee54492480c20196c6cfbf6a626aac02cbf685..80c2460bce9669c2057ee39361292666a924348d 100644 (file)
@@ -714,6 +714,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    346,
 /**/
     345,
 /**/