changeset 30691:024e1c1da31f v9.0.0680

patch 9.0.0680: tests failing with 'breakindent', 'number' and "n" in 'cpo' Commit: https://github.com/vim/vim/commit/3725116f6ec3b5c01e456b151a60c0690e04f76c Author: Bram Moolenaar <Bram@vim.org> Date: Thu Oct 6 20:48:00 2022 +0100 patch 9.0.0680: tests failing with 'breakindent', 'number' and "n" in 'cpo' Problem: Tests failing with 'breakindent', 'number' and "n" in 'cpo'. Solution: Do count the number column in topline if 'breakindent' is set.
author Bram Moolenaar <Bram@vim.org>
date Thu, 06 Oct 2022 22:00:05 +0200
parents 13730252d64c
children bfe956ad9520
files src/drawline.c src/version.c
diffstat 2 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -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
--- a/src/version.c
+++ b/src/version.c
@@ -700,6 +700,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    680,
+/**/
     679,
 /**/
     678,