diff options
author | Bram Moolenaar <Bram@vim.org> | 2012-04-20 19:47:05 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2012-04-20 19:47:05 +0200 |
commit | e436528e04cd2b5bac71ec2dcef815255a5fcc8b (patch) | |
tree | b7cb5258cab7298ad2f48a405c14e1921ec984f0 | |
parent | 35df7d2d99823124e0001e023ff1e2764cfb5937 (diff) | |
download | vim-git-e436528e04cd2b5bac71ec2dcef815255a5fcc8b.tar.gz |
updated for version 7.3.502v7.3.502
Problem: Netbeans insert halfway a line actually appends to the line.
Solution: Insert halfway the line. (Brian Victor)
-rw-r--r-- | src/netbeans.c | 7 | ||||
-rw-r--r-- | src/version.c | 2 |
2 files changed, 6 insertions, 3 deletions
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 @@ -715,6 +715,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 502, +/**/ 501, /**/ 500, |