diff options
author | bfredl <bjorn.linse@gmail.com> | 2022-06-30 13:26:31 +0600 |
---|---|---|
committer | bfredl <bjorn.linse@gmail.com> | 2022-08-31 20:40:17 +0200 |
commit | f31db30975479cb6b57247f124a65f4362f80bfe (patch) | |
tree | 772b9942c04459e3d7fd3a523c2a400978e0edb5 /src/nvim/ui.c | |
parent | 0903702634d8e5714749ea599a2f1042b3377525 (diff) | |
download | rneovim-f31db30975479cb6b57247f124a65f4362f80bfe.tar.gz rneovim-f31db30975479cb6b57247f124a65f4362f80bfe.tar.bz2 rneovim-f31db30975479cb6b57247f124a65f4362f80bfe.zip |
feat(lua): vim.ui_attach to get ui events from lua
Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
Diffstat (limited to 'src/nvim/ui.c')
-rw-r--r-- | src/nvim/ui.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nvim/ui.c b/src/nvim/ui.c index 46f4d137c4..06be5676c7 100644 --- a/src/nvim/ui.c +++ b/src/nvim/ui.c @@ -198,13 +198,16 @@ void ui_refresh(void) ext_widgets[i] = true; } + UI *compositor = uis[0]; + bool inclusive = ui_override(); - for (size_t i = 0; i < ui_count; i++) { + for (size_t i = 1; i < ui_count; i++) { UI *ui = uis[i]; width = MIN(ui->width, width); height = MIN(ui->height, height); for (UIExtension j = 0; (int)j < kUIExtCount; j++) { - ext_widgets[j] &= (ui->ui_ext[j] || inclusive); + bool in_compositor = ui->composed && compositor->ui_ext[j]; + ext_widgets[j] &= (ui->ui_ext[j] || in_compositor || inclusive); } } |