ensure writing buffer for hidden=false

remotes/origin/HEAD
pseudometa 2022-11-22 00:36:11 +01:00
parent b9f04ae0f2
commit 10c5ffdb9f
1 changed files with 1 additions and 0 deletions

View File

@ -55,6 +55,7 @@ local function fileOp(op)
end
local filepath = dir .. "/" .. newName
cmd[[update]] -- save current file; needed for people using `vim.opt.hidden=false`
if op == "duplicate" then
cmd("saveas " .. filepath)
cmd("edit " .. filepath)