summaryrefslogtreecommitdiffstats
path: root/src/normal.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2010-07-18 14:20:35 +0200
committerBram Moolenaar <Bram@vim.org>2010-07-18 14:20:35 +0200
commitfdf732eed7b1a55af0bf53e25c2ead917fd6df51 (patch)
tree1af4957c021ce9f556ab2f45171d4a10b1462920 /src/normal.c
parent7c86f4cca33e9b60cdb5dbd25d5137e0a04795ff (diff)
Fix build broken without multi-byte feature.
Diffstat (limited to 'src/normal.c')
-rw-r--r--src/normal.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/normal.c b/src/normal.c
index 5d79f35cd5..055916711d 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -3766,16 +3766,16 @@ clear_showcmd()
if (VIsual_mode == Ctrl_V)
{
-#ifdef FEAT_LINEBREAK
+# ifdef FEAT_LINEBREAK
char_u *saved_sbr = p_sbr;
/* Make 'sbr' empty for a moment to get the correct size. */
p_sbr = empty_option;
-#endif
+# endif
getvcols(curwin, &curwin->w_cursor, &VIsual, &leftcol, &rightcol);
-#ifdef FEAT_LINEBREAK
+# ifdef FEAT_LINEBREAK
p_sbr = saved_sbr;
-#endif
+# endif
sprintf((char *)showcmd_buf, "%ldx%ld", lines,
(long)(rightcol - leftcol + 1));
}
@@ -3800,7 +3800,11 @@ clear_showcmd()
}
while ((*p_sel != 'e') ? s <= e : s < e)
{
+# ifdef FEAT_MBYTE
l = (*mb_ptr2len)(s);
+# else
+ l = (*s == NUL) ? 0 : 1;
+# endif
if (l == 0)
{
++bytes;