# HG changeset patch # User vimboss # Date 1194529902 0 # Node ID 8b2e9257cc116bf30b755aeb37a742ac83f5da42 # Parent 77310929a1f94745e3d49f0cf1a6908785d3cfb0 updated for version 7.1-152 diff --git a/src/screen.c b/src/screen.c --- a/src/screen.c +++ b/src/screen.c @@ -2599,6 +2599,7 @@ win_line(wp, lnum, startrow, endrow, noc int syntax_attr = 0; /* attributes desired by syntax */ int has_syntax = FALSE; /* this buffer has syntax highl. */ int save_did_emsg; + int eol_hl_off = 0; /* 1 if highlighted char after EOL */ #endif #ifdef FEAT_SPELL int has_spell = FALSE; /* this buffer has spell checking */ @@ -4312,6 +4313,10 @@ win_line(wp, lnum, startrow, endrow, noc { #ifdef FEAT_SEARCH_EXTRA long prevcol = (long)(ptr - line) - (c == NUL); + + /* we're not really at that column when skipping some text */ + if ((wp->w_p_wrap ? wp->w_skipcol : wp->w_leftcol) > prevcol) + ++prevcol; #endif /* invert at least one char, used for Visual and empty line or @@ -4408,11 +4413,20 @@ win_line(wp, lnum, startrow, endrow, noc ScreenAttrs[off] = char_attr; #ifdef FEAT_RIGHTLEFT if (wp->w_p_rl) + { --col; + --off; + } else #endif + { ++col; + ++off; + } ++vcol; +#ifdef FEAT_SYN_HL + eol_hl_off = 1; +#endif } } @@ -4422,6 +4436,14 @@ win_line(wp, lnum, startrow, endrow, noc if (c == NUL) { #ifdef FEAT_SYN_HL + if (eol_hl_off > 0 && vcol - eol_hl_off == (long)wp->w_virtcol) + { + /* highlight last char after line */ + --col; + --off; + --vcol; + } + /* Highlight 'cursorcolumn' past end of the line. */ if (wp->w_p_wrap) v = wp->w_skipcol; @@ -4432,7 +4454,7 @@ win_line(wp, lnum, startrow, endrow, noc vcol = v + col - win_col_off(wp); if (wp->w_p_cuc - && (int)wp->w_virtcol >= vcol + && (int)wp->w_virtcol >= vcol - eol_hl_off && (int)wp->w_virtcol < W_WIDTH(wp) * (row - startrow + 1) + v && lnum != wp->w_cursor.lnum diff --git a/src/version.c b/src/version.c --- a/src/version.c +++ b/src/version.c @@ -667,6 +667,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 152, +/**/ 151, /**/ 150,