diff --git a/lua/neorg/modules/core/qol/toc/module.lua b/lua/neorg/modules/core/qol/toc/module.lua index 0dc8155a4..f29d643de 100644 --- a/lua/neorg/modules/core/qol/toc/module.lua +++ b/lua/neorg/modules/core/qol/toc/module.lua @@ -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