4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=ISO-8859-1
7 Content-Transfer-Encoding: 8bit
11 Problem: NetBeans: Changes of the "~" command are not reported.
12 Solution: Call netbeans_inserted() after performing "~". (Gordon Prieur)
13 Also change NetBeans debugging to append to the log file.
14 Also fix that "~" in Visual block mode changes too much if there
15 are multi-byte characters.
16 Files: src/nbdebug.c, src/normal.c, src/ops.c
19 *** ../vim-6.2.527/src/nbdebug.c Sun Oct 12 16:42:14 2003
20 --- src/nbdebug.c Wed Apr 14 19:55:02 2004
23 if (log_var && (file = getenv(log_var)) != NULL) {
26 ! nb_debug = fopen(file, "w");
28 fprintf(nb_debug, "%s", asctime(localtime(&now)));
29 if (level_var && (cp = getenv(level_var)) != NULL) {
31 if (log_var && (file = getenv(log_var)) != NULL) {
34 ! nb_debug = fopen(file, "a");
36 fprintf(nb_debug, "%s", asctime(localtime(&now)));
37 if (level_var && (cp = getenv(level_var)) != NULL) {
38 *** ../vim-6.2.527/src/normal.c Mon Apr 19 20:26:43 2004
39 --- src/normal.c Mon Apr 26 15:19:26 2004
46 + #ifdef FEAT_NETBEANS_INTG
52 if (checkclearopq(cap->oap))
59 startpos = curwin->w_cursor;
60 + #ifdef FEAT_NETBEANS_INTG
63 for (n = cap->count1; n > 0; --n)
65 did_change |= swapchar(cap->oap->op_type, &curwin->w_cursor);
69 if (vim_strchr(p_ww, '~') != NULL
70 && curwin->w_cursor.lnum < curbuf->b_ml.ml_line_count)
72 + #ifdef FEAT_NETBEANS_INTG
77 + ptr = ml_get(pos.lnum);
78 + count = STRLEN(ptr) - pos.col;
79 + netbeans_inserted(curbuf, pos.lnum, pos.col,
80 + count, &ptr[pos.col], count);
86 ++curwin->w_cursor.lnum;
87 curwin->w_cursor.col = 0;
95 + #ifdef FEAT_NETBEANS_INTG
96 + if (did_change && usingNetbeans)
98 + ptr = ml_get(pos.lnum);
99 + count = curwin->w_cursor.col - pos.col;
100 + netbeans_inserted(curbuf, pos.lnum, pos.col,
101 + count, &ptr[pos.col], count);
107 curwin->w_set_curswant = TRUE;
108 *** ../vim-6.2.527/src/ops.c Fri Apr 30 19:42:02 2004
109 --- src/ops.c Wed May 5 10:34:02 2004
123 if (u_save((linenr_T)(oap->start.lnum - 1),
124 (linenr_T)(oap->end.lnum + 1)) == FAIL)
128 block_prep(oap, &bd, pos.lnum, FALSE);
129 pos.col = bd.textcol;
130 ! while (--bd.textlen >= 0)
132 did_change |= swapchar(oap->op_type, &pos);
133 if (inc(&pos) == -1) /* at end of file */
138 changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L);
141 block_prep(oap, &bd, pos.lnum, FALSE);
142 pos.col = bd.textcol;
143 ! for (done = 0; done < bd.textlen; ++done)
145 did_change |= swapchar(oap->op_type, &pos);
149 if (inc(&pos) == -1) /* at end of file */
153 + /* Count extra bytes of a multi-byte character. */
154 + done += pos.col - col;
157 + # ifdef FEAT_NETBEANS_INTG
158 + if (usingNetbeans && did_change)
160 + char_u *ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
162 + netbeans_inserted(curbuf, pos.lnum, bd.textcol,
163 + bd.textlen, &ptr[bd.textcol], bd.textlen);
168 changed_lines(oap->start.lnum, 0, oap->end.lnum + 1, 0L);
176 changed_lines(oap->start.lnum, oap->start.col, oap->end.lnum + 1,
178 + #ifdef FEAT_NETBEANS_INTG
179 + if (usingNetbeans && did_change)
185 + while (pos.lnum < oap->end.lnum)
187 + ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
188 + count = STRLEN(ptr) - pos.col;
189 + netbeans_inserted(curbuf, pos.lnum, pos.col,
190 + count, &ptr[pos.col], count);
194 + ptr = ml_get_buf(curbuf, pos.lnum, FALSE);
195 + count = oap->end.col - pos.col + 1;
196 + netbeans_inserted(curbuf, pos.lnum, pos.col,
197 + count, &ptr[pos.col], count);
204 *** ../vim-6.2.527/src/version.c Wed May 5 11:17:53 2004
205 --- src/version.c Wed May 5 11:47:08 2004
209 { /* Add new patch number below this line */
215 Nobody will ever need more than 640 kB RAM.
217 Windows 98 requires 16 MB RAM.
219 Logical conclusion: Nobody will ever need Windows 98.
221 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
222 /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
223 \\\ Project leader for A-A-P -- http://www.A-A-P.org ///
224 \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///