diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-08-10 13:12:03 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-08-10 13:12:03 +0100 |
commit | 52de3a8d3943520bbd4e5e40a4c43fcc7182dac0 (patch) | |
tree | f0a94f73e6b00c4806f3abb0db025003bbee4682 /src/drawline.c | |
parent | 3a9687fb2749cb3da6e3bbf60cb9eaa81f7889ae (diff) |
patch 9.0.0183: extra space after virtual text when 'linebreak' is setv9.0.0183
Problem: Extra space after virtual text when 'linebreak' is set.
Solution: Do not count virtual text when getting linebreak value.
(closes #10884)
Diffstat (limited to 'src/drawline.c')
-rw-r--r-- | src/drawline.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/drawline.c b/src/drawline.c index 3a9c7a3a48..0300f373a6 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -2370,7 +2370,12 @@ win_line( chartabsize_T cts; init_chartabsize_arg(&cts, wp, lnum, wlv.vcol, line, p); +# ifdef FEAT_PROP_POPUP + // do not want virtual text counted here + cts.cts_has_prop_with_text = FALSE; +# endif wlv.n_extra = win_lbr_chartabsize(&cts, NULL) - 1; + clear_chartabsize_arg(&cts); // We have just drawn the showbreak value, no need to add // space for it again. @@ -2398,7 +2403,7 @@ win_line( wlv.c_extra = mb_off > 0 ? MB_FILLER_CHAR : ' '; wlv.c_final = NUL; -# if defined(FEAT_PROP_POPUP) +# ifdef FEAT_PROP_POPUP if (wlv.n_extra > 0 && c != TAB) in_linebreak = TRUE; # endif @@ -2412,10 +2417,8 @@ win_line( if (!wp->w_p_list) c = ' '; } - clear_chartabsize_arg(&cts); } #endif - in_multispace = c == ' ' && ((ptr > line + 1 && ptr[-2] == ' ') || *ptr == ' '); if (!in_multispace) |