diff options
author | Bram Moolenaar <Bram@vim.org> | 2017-10-26 18:21:24 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2017-10-26 18:21:24 +0200 |
commit | 235dddf1f4afe3a40047dbf2aca1bd177b7be18b (patch) | |
tree | 3cbd1e737405fddd53c568faad17c435d99259ef /src/buffer.c | |
parent | f204e05ae9f6bc5d922d14d457e16b590efbf3e5 (diff) |
patch 8.0.1220: skipping empty statusline groups is not correctv8.0.1220
Problem: Skipping empty statusline groups is not correct.
Solution: Also set group_end_userhl. (itchyny)
Diffstat (limited to 'src/buffer.c')
-rw-r--r-- | src/buffer.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/buffer.c b/src/buffer.c index 0d69b9d66b..dad910388b 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -4028,9 +4028,14 @@ build_stl_str_hl( /* remove group if all items are empty and highlight group * doesn't change */ group_start_userhl = group_end_userhl = 0; - for (n = 0; n < groupitem[groupdepth]; n++) + for (n = groupitem[groupdepth] - 1; n >= 0; n--) + { if (item[n].type == Highlight) - group_start_userhl = item[n].minwid; + { + group_start_userhl = group_end_userhl = item[n].minwid; + break; + } + } for (n = groupitem[groupdepth] + 1; n < curitem; n++) { if (item[n].type == Normal) |