1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: Netbeans insert halfway a line actually appends to the line.
12 Solution: Insert halfway the line. (Brian Victor)
16 *** ../vim-7.3.501/src/netbeans.c 2012-01-10 22:31:26.000000000 +0100
17 --- src/netbeans.c 2012-04-20 19:44:31.000000000 +0200
20 char_u *oldline = ml_get(lnum);
23 ! /* Insert halfway a line. For simplicity we assume we
24 ! * need to append to the line. */
25 newline = alloc_check(
26 (unsigned)(STRLEN(oldline) + len + 1));
29 ! STRCPY(newline, oldline);
30 STRCAT(newline, args);
31 ml_replace(lnum, newline, FALSE);
35 char_u *oldline = ml_get(lnum);
38 ! /* Insert halfway a line. */
39 newline = alloc_check(
40 (unsigned)(STRLEN(oldline) + len + 1));
43 ! mch_memmove(newline, oldline, (size_t)pos->col);
44 ! newline[pos->col] = NUL;
45 STRCAT(newline, args);
46 + STRCAT(newline, oldline + pos->col);
47 ml_replace(lnum, newline, FALSE);
50 *** ../vim-7.3.501/src/version.c 2012-04-20 18:05:42.000000000 +0200
51 --- src/version.c 2012-04-20 19:46:48.000000000 +0200
55 { /* Add new patch number below this line */
61 Time flies like an arrow.
62 Fruit flies like a banana.
64 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
65 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
66 \\\ an exciting new programming language -- http://www.Zimbu.org ///
67 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///