diff options
author | luukvbaal <luukvbaal@gmail.com> | 2025-04-07 12:58:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-07 03:58:18 -0700 |
commit | ca16b54c866bca6d10fc4f60874e6469bd0751cd (patch) | |
tree | e3ed8b8c0d82a1d354194a859e051eb687a1f13c /src | |
parent | cf59631f65390efcf9ad27cd63003f8711cb9e17 (diff) | |
download | rneovim-ca16b54c866bca6d10fc4f60874e6469bd0751cd.tar.gz rneovim-ca16b54c866bca6d10fc4f60874e6469bd0751cd.tar.bz2 rneovim-ca16b54c866bca6d10fc4f60874e6469bd0751cd.zip |
fix(decor): enable decoration provider in on_start #33337
Problem: An on_win-disabled decoration provider is left disabled for
the on_buf callback during the next redraw (if the provider
does not subscribe to on_end).
Solution: Move re-activation of the provider from after the on_end
callback to before the on_start callback.
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/decoration_provider.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nvim/decoration_provider.c b/src/nvim/decoration_provider.c index 902e995ad5..fe92f820b4 100644 --- a/src/nvim/decoration_provider.c +++ b/src/nvim/decoration_provider.c @@ -118,6 +118,8 @@ void decor_providers_start(void) ADD_C(args, INTEGER_OBJ((int)display_tick)); bool active = decor_provider_invoke((int)i, "start", p->redraw_start, args, true); kv_A(decor_providers, i).state = active ? kDecorProviderActive : kDecorProviderRedrawDisabled; + } else if (p->state != kDecorProviderDisabled) { + kv_A(decor_providers, i).state = kDecorProviderActive; } } } @@ -220,7 +222,6 @@ void decor_providers_invoke_end(void) MAXSIZE_TEMP_ARRAY(args, 1); ADD_C(args, INTEGER_OBJ((int)display_tick)); decor_provider_invoke((int)i, "end", p->redraw_end, args, true); - kv_A(decor_providers, i).state = kDecorProviderActive; } } decor_check_to_be_deleted(); |