diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2023-01-09 14:13:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-09 21:13:06 +0800 |
commit | 149209400383c673fdb4fdd1c9a7639139f17936 (patch) | |
tree | d2c4e5fa69fc302ec3050978a303f6a479f30291 /src/nvim/ops.c | |
parent | fc2cd28547954e64ef429c83733f06fa3ee75d50 (diff) | |
download | rneovim-149209400383c673fdb4fdd1c9a7639139f17936.tar.gz rneovim-149209400383c673fdb4fdd1c9a7639139f17936.tar.bz2 rneovim-149209400383c673fdb4fdd1c9a7639139f17936.zip |
refactor: replace char_u with char 17 - remove STRLCPY (#21235)
refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r-- | src/nvim/ops.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c index ccfd3ab834..2566108618 100644 --- a/src/nvim/ops.c +++ b/src/nvim/ops.c @@ -2440,7 +2440,7 @@ int op_change(oparg_T *oap) long pre_indent = 0; char_u *newp; char *firstline; - char_u *ins_text; + char *ins_text; char *oldp; struct block_def bd; @@ -2510,8 +2510,8 @@ int op_change(oparg_T *oap) if (ins_len > 0) { // Subsequent calls to ml_get() flush the firstline data - take a // copy of the inserted text. - ins_text = (char_u *)xmalloc((size_t)(ins_len + 1)); - STRLCPY(ins_text, firstline + bd.textcol, ins_len + 1); + ins_text = xmalloc((size_t)(ins_len + 1)); + xstrlcpy(ins_text, firstline + bd.textcol, (size_t)ins_len + 1); for (linenr = oap->start.lnum + 1; linenr <= oap->end.lnum; linenr++) { block_prep(oap, &bd, linenr, true); |