]>
Commit | Line | Data |
---|---|---|
59ab3540 AM |
1 | To: vim_dev@googlegroups.com |
2 | Subject: Patch 7.3.346 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.3.346 | |
11 | Problem: It's hard to test netbeans commands. | |
12 | Solution: Process netbeans commands after :sleep. (Xavier de Gaye) | |
13 | Files: runtime/doc/netbeans.txt, src/ex_docmd.c, src/netbeans.c | |
14 | ||
15 | ||
16 | *** ../vim-7.3.345/runtime/doc/netbeans.txt 2010-09-29 17:26:57.000000000 +0200 | |
17 | --- runtime/doc/netbeans.txt 2011-10-20 21:51:41.000000000 +0200 | |
18 | *************** | |
19 | *** 1,4 **** | |
20 | ! *netbeans.txt* For Vim version 7.3. Last change: 2010 Aug 20 | |
21 | ||
22 | ||
23 | VIM REFERENCE MANUAL by Gordon Prieur et al. | |
24 | --- 1,4 ---- | |
25 | ! *netbeans.txt* For Vim version 7.3. Last change: 2011 Oct 20 | |
26 | ||
27 | ||
28 | VIM REFERENCE MANUAL by Gordon Prieur et al. | |
29 | *************** | |
30 | *** 263,268 **** | |
31 | --- 263,274 ---- | |
32 | plain UTF-8 text this protocol could also be used with any other communication | |
33 | mechanism. | |
34 | ||
35 | + Netbeans messages are processed when Vim is idle, waiting for user input. | |
36 | + When Vim is run in non-interactive mode, for example when running an automated | |
37 | + test case that sources a Vim script, the idle loop may not be called often | |
38 | + enough. In that case, insert |sleep| commands in the Vim script. The |sleep| | |
39 | + command does invoke Netbeans messages processing. | |
40 | + | |
41 | 6.1 Kinds of messages |nb-messages| | |
42 | 6.2 Terms |nb-terms| | |
43 | 6.3 Commands |nb-commands| | |
44 | *************** | |
45 | *** 820,826 **** | |
46 | ============================================================================== | |
47 | 7. NetBeans commands *netbeans-commands* | |
48 | ||
49 | ! *:nbstart* *E511* | |
50 | :nbs[tart] {connection} Start a new Netbeans session with {connection} as the | |
51 | socket connection parameters. The format of | |
52 | {connection} is described in |netbeans-parameters|. | |
53 | --- 826,832 ---- | |
54 | ============================================================================== | |
55 | 7. NetBeans commands *netbeans-commands* | |
56 | ||
57 | ! *:nbstart* *E511* *E838* | |
58 | :nbs[tart] {connection} Start a new Netbeans session with {connection} as the | |
59 | socket connection parameters. The format of | |
60 | {connection} is described in |netbeans-parameters|. | |
61 | *************** | |
62 | *** 833,843 **** | |
63 | signs. | |
64 | ||
65 | *:nbkey* | |
66 | ! :nb[key] {key} Pass the {key} to the Vim Controller for processing | |
67 | ! | |
68 | ! When a hot-key has been installed with the specialKeys command, this command | |
69 | ! can be used to generate a hotkey messages to the Vim Controller. The events | |
70 | ! newDotAndMark, keyCommand and keyAtPos are generated (in this order). | |
71 | ||
72 | ||
73 | ============================================================================== | |
74 | --- 839,854 ---- | |
75 | signs. | |
76 | ||
77 | *:nbkey* | |
78 | ! :nb[key] {key} Pass the {key} to the Vim Controller for processing. | |
79 | ! When a hot-key has been installed with the specialKeys | |
80 | ! command, this command can be used to generate a hotkey | |
81 | ! message to the Vim Controller. | |
82 | ! This command can also be used to pass any text to the | |
83 | ! Vim Controller. It is used by Pyclewn, for example, | |
84 | ! to build the complete set of gdb commands as Vim user | |
85 | ! commands. | |
86 | ! The events newDotAndMark, keyCommand and keyAtPos are | |
87 | ! generated (in this order). | |
88 | ||
89 | ||
90 | ============================================================================== | |
91 | *** ../vim-7.3.345/src/ex_docmd.c 2011-09-30 18:35:49.000000000 +0200 | |
92 | --- src/ex_docmd.c 2011-10-20 21:50:06.000000000 +0200 | |
93 | *************** | |
94 | *** 8205,8210 **** | |
95 | --- 8205,8216 ---- | |
96 | { | |
97 | ui_delay(msec - done > 1000L ? 1000L : msec - done, TRUE); | |
98 | ui_breakcheck(); | |
99 | + #ifdef FEAT_NETBEANS_INTG | |
100 | + /* Process the netbeans messages that may have been received in the | |
101 | + * call to ui_breakcheck() when the GUI is in use. This may occur when | |
102 | + * running a test case. */ | |
103 | + netbeans_parse_messages(); | |
104 | + #endif | |
105 | } | |
106 | } | |
107 | ||
108 | *** ../vim-7.3.345/src/netbeans.c 2011-04-11 21:35:03.000000000 +0200 | |
109 | --- src/netbeans.c 2011-10-20 21:47:17.000000000 +0200 | |
110 | *************** | |
111 | *** 14,19 **** | |
112 | --- 14,26 ---- | |
113 | * which are *between* characters, whereas vim uses line number | |
114 | * and column number which are *on* characters. | |
115 | * See ":help netbeans-protocol" for explanation. | |
116 | + * | |
117 | + * The Netbeans messages are received and queued in the gui event loop, or in | |
118 | + * the select loop when Vim runs in a terminal. These messages are processed | |
119 | + * by netbeans_parse_messages() which is invoked in the idle loop when Vim is | |
120 | + * waiting for user input. The function netbeans_parse_messages() is also | |
121 | + * called from the ":sleep" command, to allow the execution of test cases that | |
122 | + * may not invoke the idle loop. | |
123 | */ | |
124 | ||
125 | #include "vim.h" | |
126 | *** ../vim-7.3.345/src/version.c 2011-10-20 21:57:43.000000000 +0200 | |
127 | --- src/version.c 2011-10-20 21:50:23.000000000 +0200 | |
128 | *************** | |
129 | *** 716,717 **** | |
130 | --- 716,719 ---- | |
131 | { /* Add new patch number below this line */ | |
132 | + /**/ | |
133 | + 346, | |
134 | /**/ | |
135 | ||
136 | -- | |
137 | From "know your smileys": | |
138 | ...---... SOS | |
139 | ||
140 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
141 | /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ | |
142 | \\\ an exciting new programming language -- http://www.Zimbu.org /// | |
143 | \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |