diff --git a/lua/hydra/hint/window.lua b/lua/hydra/hint/window.lua index 6802533..4d5bb60 100644 --- a/lua/hydra/hint/window.lua +++ b/lua/hydra/hint/window.lua @@ -108,19 +108,19 @@ function HintAutoWindow:show() end if not self.win_config then self:_make_win_config() end + local eventignore = vim.o.eventignore vim.o.eventignore = 'all' -- turn off autocommands - local winid = api.nvim_open_win(self.buffer.id, false, self.win_config) + ---@type hydra.api.Window local win = Window(winid) self.win = win - win.wo.winhighlight = 'NormalFloat:HydraHint,FloatBorder:HydraBorder' - win.wo.conceallevel = 3 - win.wo.foldenable = false - win.wo.wrap = false - - vim.o.eventignore = nil -- turn on autocommands + win.wo[win.id].winhighlight = 'NormalFloat:HydraHint,FloatBorder:HydraBorder' + win.wo[win.id].conceallevel = 3 + win.wo[win.id].foldenable = false + win.wo[win.id].wrap = false + vim.o.eventignore = eventignore -- turn on autocommands autocmd('TabEnter', { group = augroup, callback = function() if self.win:is_valid() then