Mercurial > vim
diff src/normal.c @ 2290:22529abcd646 vim73
Fixed ":s" message. Docs updates.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 10 Jul 2010 13:52:13 +0200 |
parents | a888ed7ba375 |
children | 2209060c340d |
line wrap: on
line diff
--- a/src/normal.c +++ b/src/normal.c @@ -5410,6 +5410,7 @@ nv_ident(cap) { char_u *ptr = NULL; char_u *buf; + char_u *newbuf; char_u *p; char_u *kp; /* value of 'keywordprg' */ int kp_help; /* 'keywordprg' is ":help" */ @@ -5562,13 +5563,14 @@ nv_ident(cap) vim_free(buf); return; } - buf = (char_u *)vim_realloc(buf, STRLEN(buf) + STRLEN(p) + 1); - if (buf == NULL) + newbuf = (char_u *)vim_realloc(buf, STRLEN(buf) + STRLEN(p) + 1); + if (newbuf == NULL) { vim_free(buf); vim_free(p); return; } + buf = newbuf; STRCAT(buf, p); vim_free(p); }