diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-08-18 09:43:07 +0200 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-08-18 09:43:07 +0200 |
commit | 21b2906c9cbd7683770732314935ddc181d6e736 (patch) | |
tree | 7ab32f5157b3f6c8da96cb4e1cf0b7e60c9c6949 /src | |
parent | 02e9b5a8eeaf2a4696dd68ab21b33b9fa7bd6a16 (diff) | |
download | rneovim-21b2906c9cbd7683770732314935ddc181d6e736.tar.gz rneovim-21b2906c9cbd7683770732314935ddc181d6e736.tar.bz2 rneovim-21b2906c9cbd7683770732314935ddc181d6e736.zip |
fix(winhl): do not crash when unsetting winhl in just opened window
fixes #19823
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/highlight.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/highlight.c b/src/nvim/highlight.c index 504cae9a51..a850c800f8 100644 --- a/src/nvim/highlight.c +++ b/src/nvim/highlight.c @@ -319,7 +319,7 @@ void update_window_hl(win_T *wp, bool invalid) int ns_id = wp->w_ns_hl; update_ns_hl(ns_id); - if (ns_id != wp->w_ns_hl_active) { + if (ns_id != wp->w_ns_hl_active || wp->w_ns_hl_attr == NULL) { wp->w_ns_hl_active = ns_id; wp->w_ns_hl_attr = *(NSHlAttr *)pmap_get(handle_T)(&ns_hl_attr, ns_id); |