mirror of
https://github.com/vim/vim.git
synced 2025-09-03 21:23:48 -04:00
updated for version 7.3.346
Problem: It's hard to test netbeans commands. Solution: Process netbeans commands after :sleep. (Xavier de Gaye)
This commit is contained in:
parent
6cc00c75c1
commit
e3cc6d4223
@ -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
|
plain UTF-8 text this protocol could also be used with any other communication
|
||||||
mechanism.
|
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.1 Kinds of messages |nb-messages|
|
||||||
6.2 Terms |nb-terms|
|
6.2 Terms |nb-terms|
|
||||||
6.3 Commands |nb-commands|
|
6.3 Commands |nb-commands|
|
||||||
@ -833,11 +839,16 @@ These errors occur when a message violates the protocol:
|
|||||||
signs.
|
signs.
|
||||||
|
|
||||||
*:nbkey*
|
*:nbkey*
|
||||||
:nb[key] {key} Pass the {key} to the Vim Controller for processing
|
:nb[key] {key} Pass the {key} to the Vim Controller for processing.
|
||||||
|
When a hot-key has been installed with the specialKeys
|
||||||
When a hot-key has been installed with the specialKeys command, this command
|
command, this command can be used to generate a hotkey
|
||||||
can be used to generate a hotkey messages to the Vim Controller. The events
|
message to the Vim Controller.
|
||||||
newDotAndMark, keyCommand and keyAtPos are generated (in this order).
|
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).
|
||||||
|
|
||||||
|
|
||||||
==============================================================================
|
==============================================================================
|
||||||
|
@ -8205,6 +8205,12 @@ do_sleep(msec)
|
|||||||
{
|
{
|
||||||
ui_delay(msec - done > 1000L ? 1000L : msec - done, TRUE);
|
ui_delay(msec - done > 1000L ? 1000L : msec - done, TRUE);
|
||||||
ui_breakcheck();
|
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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14,6 +14,13 @@
|
|||||||
* which are *between* characters, whereas vim uses line number
|
* which are *between* characters, whereas vim uses line number
|
||||||
* and column number which are *on* characters.
|
* and column number which are *on* characters.
|
||||||
* See ":help netbeans-protocol" for explanation.
|
* 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"
|
#include "vim.h"
|
||||||
|
@ -714,6 +714,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 */
|
||||||
|
/**/
|
||||||
|
346,
|
||||||
/**/
|
/**/
|
||||||
345,
|
345,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user