Skip to content

Commit

Permalink
fix(buffer): Disable tmp flag on buffer after edit
Browse files Browse the repository at this point in the history
Fixes #827
  • Loading branch information
kristijanhusak committed Dec 6, 2024
1 parent 94894f3 commit 6c39469
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ftplugin/org.lua
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ vim.b.undo_ftplugin = table.concat({
'foldexpr<',
'formatexpr<',
'omnifunc<',
'| unlet! b:org_bufnr',
'| unlet! b:org_bufnr b:org_tmp_edit_window',
}, ' ')
1 change: 1 addition & 0 deletions lua/orgmode/utils/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -538,6 +538,7 @@ function utils.edit_file(filename)
end,
close = function()
vim.cmd('silent! w')
vim.b.org_tmp_edit_window = nil
if buf_not_already_loaded then
vim.cmd('silent! bw!')
else
Expand Down

0 comments on commit 6c39469

Please sign in to comment.