Skip to content

Commit

Permalink
fix: prevent try to display lines on invalid buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
ofseed committed Nov 30, 2023
1 parent d055ed2 commit f30ae17
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/lsp-lens/lens-util.lua
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@ local function normalize_rangeStart_character(bufnr, query)
end

local function display_lines(bufnr, query_results)
if vim.fn.bufexists(bufnr) == 0 then
return
end
local ns_id = vim.api.nvim_create_namespace("lsp-lens")
delete_existing_lines(bufnr, ns_id)
for _, query in pairs(query_results or {}) do
Expand Down

0 comments on commit f30ae17

Please # to comment.