]> granicus.if.org Git - vim/commitdiff
patch 9.0.0680: tests failing with 'breakindent', 'number' and "n" in 'cpo' v9.0.0680
authorBram Moolenaar <Bram@vim.org>
Thu, 6 Oct 2022 19:48:00 +0000 (20:48 +0100)
committerBram Moolenaar <Bram@vim.org>
Thu, 6 Oct 2022 19:48:00 +0000 (20:48 +0100)
Problem:    Tests failing with 'breakindent', 'number' and "n" in 'cpo'.
Solution:   Do count the number column in topline if 'breakindent' is set.

src/drawline.c
src/version.c

index c38cdbc528034f0fa010b39c95afb276ba6b7ea9..f738e76b4e6539094ca334f1072d5623be986e39 100644 (file)
@@ -346,7 +346,13 @@ handle_lnum_col(
 
     if ((wp->w_p_nu || wp->w_p_rnu)
             && (wlv->row == wlv->startrow + wlv->filler_lines || !has_cpo_n)
-            && !(has_cpo_n && wp->w_skipcol > 0 && wlv->lnum == wp->w_topline))
+            // there is no line number in a wrapped line when "n" is in
+            // 'cpoptions', but 'breakindent' assumes it anyway.
+            && !((has_cpo_n
+#ifdef FEAT_LINEBREAK
+                    && !wp->w_p_bri
+#endif
+                 ) && wp->w_skipcol > 0 && wlv->lnum == wp->w_topline))
     {
 #ifdef FEAT_SIGNS
        // If 'signcolumn' is set to 'number' and a sign is present
index 2e9c91db9b867708162115ebf321f54ab08d6bf6..346894dd6a42066e4b155d704f5b85fa8c7fd22c 100644 (file)
@@ -699,6 +699,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    680,
 /**/
     679,
 /**/