Skip to content

Commit

Permalink
fix(ui): dont propagate events handled by Noice to other uis. Fixes #17
Browse files Browse the repository at this point in the history
  • Loading branch information
folke committed Jul 17, 2023
1 parent 26394ed commit 1cff24c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions lua/noice/ui/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,8 @@ function M.enable()
end
stack_level = stack_level - 1

-- work-around for segfaults with TUI rework
-- this will block other uis from processing this message (being TUI) again
-- Will be false for GUI so that they can still prcess the message as well
local ui = vim.api.nvim_list_uis()[1]
return ui and ui.chan == 1 and ui.ext_termcolors
-- make sure only Noice handles these events
return true
end)

vim.api.nvim_create_autocmd("SwapExists", {
Expand Down

0 comments on commit 1cff24c

Please sign in to comment.