diff src/screen.c @ 336:2d8c2622e1fa

updated for version 7.0087
author vimboss
date Fri, 17 Jun 2005 22:00:15 +0000
parents 0ee579e01743
children 7e819e81117e
line wrap: on
line diff
--- a/src/screen.c
+++ b/src/screen.c
@@ -3594,11 +3594,16 @@ win_line(wp, lnum, startrow, endrow)
 			char_attr = syntax_attr;
 		    if (c != 0 && (!has_syntax || can_spell))
 		    {
+			char_u	*prev_ptr;
 # ifdef FEAT_MBYTE
-			char_u	*prev_ptr = ptr - (has_mbyte ? mb_l : 1);
-# else
-			char_u	*prev_ptr = ptr - 1;
+			if (has_mbyte)
+			{
+			    prev_ptr = ptr - mb_l;
+			    v -= mb_l - 1;
+			}
+			else
 # endif
+			    prev_ptr = ptr - 1;
 			word_end = v + spell_check(wp, prev_ptr, &spell_attr);
 
 			/* In Insert mode only highlight a word that