fix: do not error out when opening with swapfile

fixes #880
This commit is contained in:
kiyan
2022-02-05 12:42:22 +01:00
parent 99d65afd6e
commit 9880c22ace

View File

@@ -185,7 +185,7 @@ function M.fn(mode, filename)
cmd = cmd .. vim.fn.fnameescape(filename)
api.nvim_set_current_win(target_winid)
vim.cmd(cmd)
pcall(vim.cmd, cmd)
view.resize()
end