Skip to content

Commit 6cdd6a1

Browse files
benlubasvhyrro
authored andcommitted
fix(toc): don't try to open a toc from a toc
1 parent baf9934 commit 6cdd6a1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lua/neorg/modules/core/qol/toc/module.lua

+3
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,9 @@ module.on_event = function(event)
452452

453453
local tabpage = vim.api.nvim_win_get_tabpage(vim.fn.bufwinid(norg_buffer))
454454
if ui_data_of_tabpage[tabpage] then
455+
if norg_buffer == ui_data_of_tabpage[tabpage].buffer then
456+
return
457+
end
455458
module.public.update_toc(toc_title, ui_data_of_tabpage[tabpage], norg_buffer)
456459
return
457460
end

0 commit comments

Comments
 (0)