summaryrefslogtreecommitdiff
path: root/src/screen.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2004-12-19 22:46:22 +0000
committerBram Moolenaar <Bram@vim.org>2004-12-19 22:46:22 +0000
commit1cd871b5341bf43ee99e136844e3131014880f92 (patch)
tree6bd9573dbc14de3c4ec85e424cbec9c8d1ee0ed8 /src/screen.c
parent46c9c73de8def79baf8f0a34a12549f6c14944f3 (diff)
downloadvim-git-1cd871b5341bf43ee99e136844e3131014880f92.tar.gz
updated for version 7.0023v7.0023
Diffstat (limited to 'src/screen.c')
-rw-r--r--src/screen.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/screen.c b/src/screen.c
index 88b17d4be..abd9be7e6 100644
--- a/src/screen.c
+++ b/src/screen.c
@@ -2779,11 +2779,8 @@ win_line(wp, lnum, startrow, endrow)
vcol += c;
#ifdef FEAT_MBYTE
prev_ptr = ptr;
- if (has_mbyte)
- ptr += (*mb_ptr2len_check)(ptr);
- else
#endif
- ++ptr;
+ mb_ptr_adv(ptr);
}
#ifdef FEAT_VIRTUALEDIT
@@ -3640,7 +3637,9 @@ win_line(wp, lnum, startrow, endrow)
&& ((wp->w_p_list && lcs_eol > 0)
|| ((fromcol >= 0 || fromcol_prev >= 0)
&& tocol > vcol
+#ifdef FEAT_VISUAL
&& VIsual_mode != Ctrl_V
+#endif
&& (
# ifdef FEAT_RIGHTLEFT
wp->w_p_rl ? (col >= 0) :
@@ -4772,16 +4771,8 @@ status_match_len(xp, s)
#endif
)
++s;
-#ifdef FEAT_MBYTE
- if (has_mbyte)
- {
- len += ptr2cells(s);
- s += (*mb_ptr2len_check)(s);
- }
- else
-#endif
- len += ptr2cells(s++);
-
+ len += ptr2cells(s++);
+ mb_ptr_adv(s);
}
return len;
@@ -4827,7 +4818,12 @@ win_redr_status_matches(xp, num_matches, matches, match, showtail)
if (matches == NULL) /* interrupted completion? */
return;
- buf = alloc((unsigned)Columns + 1);
+#ifdef FEAT_MBYTE
+ if (has_mbyte)
+ buf = alloc((unsigned)Columns * MB_MAXBYTES + 1);
+ else
+#endif
+ buf = alloc((unsigned)Columns + 1);
if (buf == NULL)
return;