summaryrefslogtreecommitdiffstats
path: root/src/ops.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-09-02 19:12:26 +0000
committerBram Moolenaar <Bram@vim.org>2004-09-02 19:12:26 +0000
commitd4755bb0e04fca334675f1503bd6474b017a9bba (patch)
tree8be8df859191e78ee9eef80d3b341fd5d0c1b81b /src/ops.c
parent269ec658f0fad22b2bf9f71b06a4e6e10277f0e5 (diff)
updated for version 7.0014
Diffstat (limited to 'src/ops.c')
-rw-r--r--src/ops.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/ops.c b/src/ops.c
index 128984e6a7..1184c9d16c 100644
--- a/src/ops.c
+++ b/src/ops.c
@@ -3703,6 +3703,11 @@ ex_display(eap)
int name;
int attr;
char_u *arg = eap->arg;
+#ifdef FEAT_MBYTE
+ int clen;
+#else
+# define clen 1
+#endif
if (arg != NULL && *arg == NUL)
arg = NULL;
@@ -3750,10 +3755,12 @@ ex_display(eap)
}
for (p = yb->y_array[j]; *p && (n -= ptr2cells(p)) >= 0; ++p)
{
- msg_outtrans_len(p, 1);
#ifdef FEAT_MBYTE
- if (has_mbyte)
- p += (*mb_ptr2len_check)(p) - 1;
+ clen = (*mb_ptr2len_check)(p);
+#endif
+ msg_outtrans_len(p, clen);
+#ifdef FEAT_MBYTE
+ p += clen - 1;
#endif
}
}