aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/ops.c
diff options
context:
space:
mode:
authorZviRackover <zvirack@gmail.com>2018-09-02 01:36:18 +0300
committerZviRackover <zvirack@gmail.com>2018-09-09 10:45:50 +0300
commitac13e65ae0ce98516e816ba4fcf468d19e750c30 (patch)
treee039a2201ece3358068a659b4bb84b204afd866b /src/nvim/ops.c
parentcbdbc4f63d68a6b17b9eea5c67130e37d3d0f278 (diff)
downloadrneovim-ac13e65ae0ce98516e816ba4fcf468d19e750c30.tar.gz
rneovim-ac13e65ae0ce98516e816ba4fcf468d19e750c30.tar.bz2
rneovim-ac13e65ae0ce98516e816ba4fcf468d19e750c30.zip
Remove has_mbytes local to lines changed in parent commit
Diffstat (limited to 'src/nvim/ops.c')
-rw-r--r--src/nvim/ops.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/nvim/ops.c b/src/nvim/ops.c
index fcfadbfd28..d28e51ba4d 100644
--- a/src/nvim/ops.c
+++ b/src/nvim/ops.c
@@ -1737,13 +1737,8 @@ int op_replace(oparg_T *oap, int c)
if (had_ctrl_v_cr || (c != '\r' && c != '\n')) {
// strlen(newp) at this point
int newp_len = bd.textcol + bd.startspaces;
- if (has_mbyte) {
- while (--num_chars >= 0) {
- newp_len += utf_char2bytes(c, newp + newp_len);
- }
- } else {
- memset(newp + newp_len, c, (size_t)numc);
- newp_len += numc;
+ while (--num_chars >= 0) {
+ newp_len += utf_char2bytes(c, newp + newp_len);
}
if (!bd.is_short) {
// insert post-spaces