mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 10:45:16 -07:00
fix(lsp): enable() does not activate inlay hints on open buffers #28629
Problem: inlay_hint `enable(<no args>)` does not activate inlay hints on open buffers. If a buffer does not have a corresponding `bufstate` in `bufstates`, then `enable` all buffers will not take effect on it. Solution: Make the effective range determined by the loaded buffers. Fix #28624
This commit is contained in:
parent
d8deb91819
commit
c3c673cdec
@ -429,7 +429,7 @@ function M.enable(enable, filter)
|
||||
|
||||
if filter.bufnr == nil then
|
||||
globalstate.enabled = enable
|
||||
for bufnr, _ in pairs(bufstates) do
|
||||
for _, bufnr in ipairs(api.nvim_list_bufs()) do
|
||||
if api.nvim_buf_is_loaded(bufnr) then
|
||||
if enable == false then
|
||||
_disable(bufnr)
|
||||
|
Loading…
Reference in New Issue
Block a user