patch 9.0.2151: 'breakindent' is not drawn after diff filler lines
Problem: 'breakindent' is not drawn after diff filler lines.
Solution: Correct check for whether 'breakindent' should be drawn.
closes: #13624
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/drawline.c b/src/drawline.c
index 6909e0f..9f385f0 100644
--- a/src/drawline.c
+++ b/src/drawline.c
@@ -498,10 +498,11 @@
{
wlv->draw_state = WL_BRI;
// if wlv->need_showbreak is set, breakindent also applies
- if (wp->w_p_bri && (wlv->row != wlv->startrow || wlv->need_showbreak)
+ if (wp->w_p_bri && (wlv->row > wlv->startrow
# ifdef FEAT_DIFF
- && wlv->filler_lines == 0
+ + wlv->filler_lines
# endif
+ || wlv->need_showbreak)
# ifdef FEAT_PROP_POPUP
&& !wlv->dont_use_showbreak
# endif
diff --git a/src/testdir/dumps/Test_diff_breakindent_after_filler.dump b/src/testdir/dumps/Test_diff_breakindent_after_filler.dump
new file mode 100644
index 0000000..d9c4873
--- /dev/null
+++ b/src/testdir/dumps/Test_diff_breakindent_after_filler.dump
@@ -0,0 +1,8 @@
+| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @18||+1&&| +0#0000e05#a8a8a8255@1|a+0#0000000#ffffff0| @18
+| +0#0000e05#a8a8a8255@1|b+0#0000000#5fd7ff255| @18||+1&#ffffff0| +0#0000e05#a8a8a8255@1|-+0#4040ff13#afffff255@19
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|c@17||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|c@17
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|c@17||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|c@17
+| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|c@13| @3||+1&&| +0#0000e05#a8a8a8255@1| +0#0000000#ffffff0@1|c@12>c| @3
+|~+0#4040ff13&| @20||+1#0000000&|~+0#4040ff13&| @20
+|~| @20||+1#0000000&|~+0#4040ff13&| @20
+| +0#0000000&@26|2|,|5|2|-|5|6| @6|A|l@1|
diff --git a/src/testdir/test_diffmode.vim b/src/testdir/test_diffmode.vim
index e05d916..930fd7b 100644
--- a/src/testdir/test_diffmode.vim
+++ b/src/testdir/test_diffmode.vim
Binary files differ
diff --git a/src/version.c b/src/version.c
index 16d13b9..20245cd 100644
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 2151,
+/**/
2150,
/**/
2149,