diff options
author | Bram Moolenaar <Bram@vim.org> | 2022-10-06 20:18:16 +0100 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2022-10-06 20:18:16 +0100 |
commit | 35b251d2c2c9d415887d334473669ea886117356 (patch) | |
tree | 464d7c5573340828a13d358c6c51da6e451dd629 /src/drawline.c | |
parent | 97f0eb169bf805c372b13c6bc9a03da2e75e3354 (diff) |
patch 9.0.0679: tests failing with 'smoothscroll', 'number' and "n" in 'cpo'v9.0.0679
Problem: Tests failing with 'smoothscroll', 'number' and "n" in 'cpo'.
Solution: Do not count number column in topline if columns are skipped.
Diffstat (limited to 'src/drawline.c')
-rw-r--r-- | src/drawline.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/drawline.c b/src/drawline.c index 4bda102bae..c38cdbc528 100644 --- a/src/drawline.c +++ b/src/drawline.c @@ -342,9 +342,11 @@ handle_lnum_col( int sign_present UNUSED, int num_attr UNUSED) { + int has_cpo_n = vim_strchr(p_cpo, CPO_NUMCOL) != NULL; + if ((wp->w_p_nu || wp->w_p_rnu) - && (wlv->row == wlv->startrow + wlv->filler_lines - || vim_strchr(p_cpo, CPO_NUMCOL) == NULL)) + && (wlv->row == wlv->startrow + wlv->filler_lines || !has_cpo_n) + && !(has_cpo_n && wp->w_skipcol > 0 && wlv->lnum == wp->w_topline)) { #ifdef FEAT_SIGNS // If 'signcolumn' is set to 'number' and a sign is present |