comparison src/screen.c @ 499:08012a1ff8d4 v7.0137

updated for version 7.0137
author vimboss
date Thu, 25 Aug 2005 21:27:31 +0000
parents 6f8b578776ab
children ce2181d14aa0
comparison
equal deleted inserted replaced
498:f9ea3888b054 499:08012a1ff8d4
2914 #ifdef FEAT_LINEBREAK 2914 #ifdef FEAT_LINEBREAK
2915 /* When w_skipcol is non-zero, first line needs 'showbreak' */ 2915 /* When w_skipcol is non-zero, first line needs 'showbreak' */
2916 if (wp->w_p_wrap) 2916 if (wp->w_p_wrap)
2917 need_showbreak = TRUE; 2917 need_showbreak = TRUE;
2918 #endif 2918 #endif
2919 #ifdef FEAT_SYN_HL
2920 /* When spell checking a word we need to figure out the start of the
2921 * word and if it's badly spelled or not. */
2922 if (has_spell)
2923 {
2924 int len;
2925
2926 pos = wp->w_cursor;
2927 wp->w_cursor.lnum = lnum;
2928 wp->w_cursor.col = ptr - line;
2929 len = spell_move_to(wp, FORWARD, TRUE, TRUE, &spell_attr);
2930 if (len == 0 || wp->w_cursor.col > ptr - line)
2931 {
2932 /* no bad word found at line start, don't check until end of a
2933 * word */
2934 spell_attr = 0;
2935 word_end = spell_to_word_end(ptr, wp->w_buffer) - line + 1;
2936 }
2937 else
2938 /* bad word found, use attributes until end of word */
2939 word_end = wp->w_cursor.col + len + 1;
2940
2941 wp->w_cursor = pos;
2942 }
2943 #endif
2919 } 2944 }
2920 2945
2921 /* 2946 /*
2922 * Correct highlighting for cursor that can't be disabled. 2947 * Correct highlighting for cursor that can't be disabled.
2923 * Avoids having to check this for each character. 2948 * Avoids having to check this for each character.