summaryrefslogtreecommitdiffstats
path: root/src/drawline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2021-11-29 19:18:57 +0000
committerBram Moolenaar <Bram@vim.org>2021-11-29 19:18:57 +0000
commit0c359af5c0fd106d3f57cc0bb7cef1c89b5e1e10 (patch)
tree81e741e604559a6f4d2ade79da6dfa5a602840b3 /src/drawline.c
parent0b74d00693f2ff5f45cb5808197df7d1aaa5cb41 (diff)
patch 8.2.3698: match highlighting continues over breakindentv8.2.3698
Problem: Match highlighting continues over breakindent. Solution: Stop before the end column. (closes #9242)
Diffstat (limited to 'src/drawline.c')
-rw-r--r--src/drawline.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/drawline.c b/src/drawline.c
index e68a602858..5fcdc49457 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -434,6 +434,7 @@ win_line(
#if defined(FEAT_CONCEAL) || defined(FEAT_SEARCH_EXTRA)
int match_conc = 0; // cchar for match functions
+ int on_last_col = FALSE;
#endif
#ifdef FEAT_CONCEAL
int syntax_flags = 0;
@@ -1382,7 +1383,8 @@ win_line(
v = (long)(ptr - line);
search_attr = update_search_hl(wp, lnum, (colnr_T)v, &line,
&screen_search_hl, &has_match_conc,
- &match_conc, did_line_attr, lcs_eol_one);
+ &match_conc, did_line_attr, lcs_eol_one,
+ &on_last_col);
ptr = line + v; // "line" may have been changed
// Do not allow a conceal over EOL otherwise EOL will be missed
@@ -2012,6 +2014,10 @@ win_line(
if (n_extra < 0)
n_extra = 0;
}
+ if (on_last_col)
+ // Do not continue search/match highlighting over the
+ // line break.
+ search_attr = 0;
if (c == TAB && n_extra + col > wp->w_width)
# ifdef FEAT_VARTABS