summaryrefslogtreecommitdiffstats
path: root/src/drawline.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-10-06 20:48:00 +0100
committerBram Moolenaar <Bram@vim.org>2022-10-06 20:48:00 +0100
commit3725116f6ec3b5c01e456b151a60c0690e04f76c (patch)
treeaa735489d28f654d15bbdb9b7c1b7c41ecf3289a /src/drawline.c
parent35b251d2c2c9d415887d334473669ea886117356 (diff)
patch 9.0.0680: tests failing with 'breakindent', 'number' and "n" in 'cpo'v9.0.0680
Problem: Tests failing with 'breakindent', 'number' and "n" in 'cpo'. Solution: Do count the number column in topline if 'breakindent' is set.
Diffstat (limited to 'src/drawline.c')
-rw-r--r--src/drawline.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/drawline.c b/src/drawline.c
index c38cdbc528..f738e76b4e 100644
--- 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