Skip to content

Commit

Permalink
Merge pull request #34 from ofseed/main
Browse files Browse the repository at this point in the history
fix: prevent try to display lines on invalid buffer

---

LGTM, thanks!!!
  • Loading branch information
VidocqH authored Dec 7, 2023
2 parents d055ed2 + f30ae17 commit d067924
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 d067924

Please # to comment.