From dbe5d361feb65137099644329cf0ecfd4a945a14 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Sat, 8 Feb 2020 18:35:31 +0100 Subject: patch 8.2.0235: draw error when an empty group is removed from 'statusline' Problem: Draw error when an empty group is removed from 'statusline'. Solution: Do not use highlighting from a removed group. --- src/buffer.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/buffer.c') diff --git a/src/buffer.c b/src/buffer.c index 7ff809773..25620afb5 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -4216,6 +4216,10 @@ build_stl_str_hl( { p = t; l = 0; + // do not use the highlighting from the removed group + for (n = groupitem[groupdepth] + 1; n < curitem; n++) + if (item[n].type == Highlight) + item[n].type = Empty; } } if (l > item[groupitem[groupdepth]].maxwid) -- cgit v1.2.1