]> granicus.if.org Git - vim/commitdiff
patch 9.0.0679: tests failing with 'smoothscroll', 'number' and "n" in 'cpo' v9.0.0679
authorBram Moolenaar <Bram@vim.org>
Thu, 6 Oct 2022 19:18:16 +0000 (20:18 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 6 Oct 2022 19:18:16 +0000 (20:18 +0100)
Problem:    Tests failing with 'smoothscroll', 'number' and "n" in 'cpo'.
Solution:   Do not count number column in topline if columns are skipped.

src/drawline.c
src/version.c

index 4bda102baecef93c857580cde36e445350b2c17e..c38cdbc528034f0fa010b39c95afb276ba6b7ea9 100644 (file)
@@ -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
index 014a83c34288fe6ad112567260679e7b9618eb1c..2e9c91db9b867708162115ebf321f54ab08d6bf6 100644 (file)
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    679,
 /**/
     678,
 /**/