Mercurial > vim
changeset 30689:ac8467091916 v9.0.0679
patch 9.0.0679: tests failing with 'smoothscroll', 'number' and "n" in 'cpo'
Commit: https://github.com/vim/vim/commit/35b251d2c2c9d415887d334473669ea886117356
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Oct 6 20:18:16 2022 +0100
patch 9.0.0679: tests failing with 'smoothscroll', 'number' and "n" in 'cpo'
Problem: Tests failing with 'smoothscroll', 'number' and "n" in 'cpo'.
Solution: Do not count number column in topline if columns are skipped.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 06 Oct 2022 21:30:04 +0200 |
parents | 57cfb6040e3b |
children | 13730252d64c |
files | src/drawline.c src/version.c |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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