Skip to content

Commit e5e797e

Browse files
benlubasNTBBloodbath
authored andcommitted
fix: Neorg return to most recent file
1 parent 1985f2d commit e5e797e

File tree

1 file changed

+1
-1
lines changed
  • lua/neorg/modules/core/neorgcmd/commands/return

1 file changed

+1
-1
lines changed

lua/neorg/modules/core/neorgcmd/commands/return/module.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ module.on_event = function(event)
3232
local buffers = vim.api.nvim_list_bufs()
3333

3434
local to_delete = {}
35-
for _, buffer in ipairs(buffers) do
35+
for buffer in vim.iter(buffers):rev() do
3636
if vim.fn.buflisted(buffer) == 1 then
3737
-- If the listed buffer we're working with has a .norg extension then remove it (not forcibly)
3838
if not vim.endswith(vim.api.nvim_buf_get_name(buffer), ".norg") then

0 commit comments

Comments
 (0)