Skip to content

Commit 2b3761f

Browse files
committed
updated for version 7.3.502
Problem: Netbeans insert halfway a line actually appends to the line. Solution: Insert halfway the line. (Brian Victor)
1 parent e58fc05 commit 2b3761f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/netbeans.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,14 +1812,15 @@ nb_do_cmd(
18121812
char_u *oldline = ml_get(lnum);
18131813
char_u *newline;
18141814

1815-
/* Insert halfway a line. For simplicity we assume we
1816-
* need to append to the line. */
1815+
/* Insert halfway a line. */
18171816
newline = alloc_check(
18181817
(unsigned)(STRLEN(oldline) + len + 1));
18191818
if (newline != NULL)
18201819
{
1821-
STRCPY(newline, oldline);
1820+
mch_memmove(newline, oldline, (size_t)pos->col);
1821+
newline[pos->col] = NUL;
18221822
STRCAT(newline, args);
1823+
STRCAT(newline, oldline + pos->col);
18231824
ml_replace(lnum, newline, FALSE);
18241825
}
18251826
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,8 @@ static char *(features[]) =
714714

715715
static int included_patches[] =
716716
{ /* Add new patch number below this line */
717+
/**/
718+
502,
717719
/**/
718720
501,
719721
/**/

0 commit comments

Comments
 (0)