Skip to content

Commit

Permalink
fix: support single buffer enabled without global
Browse files Browse the repository at this point in the history
fix #744
  • Loading branch information
lukas-reineke committed Oct 23, 2023
1 parent 8a7b48f commit 4210bdf
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions lua/ibl/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,23 @@ local clear_buffer = function(bufnr)
for _, fn in pairs(hooks.get(bufnr, hooks.type.CLEAR)) do
fn(bufnr)
end
global_buffer_state[bufnr] = nil
end

---@param config ibl.config.full
local setup = function(config)
M.initialized = true

if not config.enabled then
for bufnr, _ in pairs(global_buffer_state) do
clear_buffer(bufnr)
if not conf.get_config(bufnr).enabled then
clear_buffer(bufnr)
end
end
global_buffer_state = {}
inlay_hints.clear()
return
end

inlay_hints.setup()
highlights.setup()
autocmds.setup()
M.initialized = true
M.refresh_all()
end

Expand Down

0 comments on commit 4210bdf

Please sign in to comment.