fix: paste image error with os.execute (closes #241)

This commit is contained in:
Thomas Lambert
2023-05-01 22:48:14 +02:00
parent 82368ff84e
commit 325aa88f1e

View File

@@ -403,7 +403,7 @@ local function imgFromClipboard()
local relpath = make_relative_path(vim.fn.expand("%:p"), png, "/") local relpath = make_relative_path(vim.fn.expand("%:p"), png, "/")
local result = os.execute(get_paste_command(pngdir, pngname)) local result = os.execute(get_paste_command(pngdir, pngname))
if result > 0 then if not result then
vim.api.nvim_err_writeln( vim.api.nvim_err_writeln(
string.format( string.format(
"Unable to write image %s (exit code: %d). Is there an image on the clipboard? ", "Unable to write image %s (exit code: %d). Is there an image on the clipboard? ",