aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/buffer.c
diff options
context:
space:
mode:
authorBjörn Linse <bjorn.linse@gmail.com>2020-02-08 20:48:22 +0100
committerBjörn Linse <bjorn.linse@gmail.com>2020-02-09 09:42:26 +0100
commit70c212e4808ca36279c65b630ff1d231e75349d3 (patch)
tree6b548306f4befe26b67cc69893f254ee9133d047 /src/nvim/buffer.c
parent1f479fffbf220deba897dc969631edfd28f707b3 (diff)
downloadrneovim-70c212e4808ca36279c65b630ff1d231e75349d3.tar.gz
rneovim-70c212e4808ca36279c65b630ff1d231e75349d3.tar.bz2
rneovim-70c212e4808ca36279c65b630ff1d231e75349d3.zip
vim-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. https://github.com/vim/vim/commit/dbe5d361feb65137099644329cf0ecfd4a945a14
Diffstat (limited to 'src/nvim/buffer.c')
-rw-r--r--src/nvim/buffer.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index 5083780719..19d0cac2d3 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -3531,6 +3531,12 @@ int build_stl_str_hl(
if (n == curitem && group_start_userhl == group_end_userhl) {
out_p = t;
group_len = 0;
+ // do not use the highlighting from the removed group
+ for (n = groupitems[groupdepth] + 1; n < curitem; n++) {
+ if (items[n].type == Highlight) {
+ items[n].type = Empty;
+ }
+ }
}
}