diff --git a/src/netbeans.c b/src/netbeans.c index e38d8835a..d2f4ce4da 100644 --- a/src/netbeans.c +++ b/src/netbeans.c @@ -1812,14 +1812,15 @@ nb_do_cmd( char_u *oldline = ml_get(lnum); char_u *newline; - /* Insert halfway a line. For simplicity we assume we - * need to append to the line. */ + /* Insert halfway a line. */ newline = alloc_check( (unsigned)(STRLEN(oldline) + len + 1)); if (newline != NULL) { - STRCPY(newline, oldline); + mch_memmove(newline, oldline, (size_t)pos->col); + newline[pos->col] = NUL; STRCAT(newline, args); + STRCAT(newline, oldline + pos->col); ml_replace(lnum, newline, FALSE); } } diff --git a/src/version.c b/src/version.c index 94d429e4c..7bce14667 100644 --- a/src/version.c +++ b/src/version.c @@ -714,6 +714,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 502, /**/ 501, /**/