Skip to content

Commit

Permalink
fix: Neorg return to most recent file
Browse files Browse the repository at this point in the history
  • Loading branch information
benlubas authored and NTBBloodbath committed Jul 28, 2024
1 parent 1985f2d commit e5e797e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/neorg/modules/core/neorgcmd/commands/return/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ module.on_event = function(event)
local buffers = vim.api.nvim_list_bufs()

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

0 comments on commit e5e797e

Please sign in to comment.