Skip to content

Commit

Permalink
fix: clear biscuits before has_nodes so that deleting a line actually…
Browse files Browse the repository at this point in the history
… removes the biscuit for that line (#51)
  • Loading branch information
cmgriffing authored Apr 14, 2024
1 parent a58b397 commit ce38a7f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/nvim-biscuits/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ nvim_biscuits.decorate_nodes = function(bufnr, lang)
local children = {}
local has_nodes = true

vim.api.nvim_buf_clear_namespace(bufnr, biscuit_highlight_group,
0, -1)

while has_nodes do
for index, node in ipairs(nodes) do
children = utils.merge_arrays(children,
Expand Down

0 comments on commit ce38a7f

Please sign in to comment.