0
0
mirror of https://github.com/vim/vim.git synced 2025-09-23 03:43:49 -04:00

patch 8.2.2903: cursor position wrong on wrapped line with 'signcolumn'

Problem:    Cursor position wrong on wrapped line with 'signcolumn'.
Solution:   Don't add space for showbreak twice. (Christian Brabandt,
            closes #8262)
This commit is contained in:
Bram Moolenaar
2021-05-29 17:56:37 +02:00
parent 5a6cfb3ff2
commit a06e345af5
3 changed files with 25 additions and 0 deletions

View File

@@ -1981,6 +1981,12 @@ win_line(
// TODO: is passing p for start of the line OK?
n_extra = win_lbr_chartabsize(wp, line, p, (colnr_T)vcol,
NULL) - 1;
// We have just drawn the showbreak value, no need to add
// space for it again
if (vcol == vcol_sbr)
n_extra -= MB_CHARLEN(get_showbreak_value(wp));
if (c == TAB && n_extra + col > wp->w_width)
# ifdef FEAT_VARTABS
n_extra = tabstop_padding(vcol, wp->w_buffer->b_p_ts,