Skip to content

Commit

Permalink
fix(toc): don't try to open a toc from a toc
Browse files Browse the repository at this point in the history
  • Loading branch information
benlubas authored and vhyrro committed Jun 25, 2024
1 parent baf9934 commit 6cdd6a1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/neorg/modules/core/qol/toc/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,9 @@ module.on_event = function(event)

local tabpage = vim.api.nvim_win_get_tabpage(vim.fn.bufwinid(norg_buffer))
if ui_data_of_tabpage[tabpage] then
if norg_buffer == ui_data_of_tabpage[tabpage].buffer then
return
end
module.public.update_toc(toc_title, ui_data_of_tabpage[tabpage], norg_buffer)
return
end
Expand Down

0 comments on commit 6cdd6a1

Please sign in to comment.