mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +00:00
lint
This commit is contained in:
@@ -1562,12 +1562,13 @@ void ins_str(char_u *s)
|
||||
oldlen = (int)STRLEN(oldp);
|
||||
|
||||
newp = (char_u *)xmalloc((size_t)oldlen + (size_t)newlen + 1);
|
||||
if (col > 0)
|
||||
if (col > 0) {
|
||||
memmove(newp, oldp, (size_t)col);
|
||||
}
|
||||
memmove(newp + col, s, (size_t)newlen);
|
||||
int bytes = oldlen - col + 1;
|
||||
assert(bytes >= 0);
|
||||
memmove(newp + col + newlen, oldp + col, bytes);
|
||||
memmove(newp + col + newlen, oldp + col, (size_t)bytes);
|
||||
ml_replace(lnum, newp, false);
|
||||
changed_bytes(lnum, col);
|
||||
curwin->w_cursor.col += newlen;
|
||||
|
Reference in New Issue
Block a user