From 325aa88f1e02edc8e06b97172de2ebd9d072f47a Mon Sep 17 00:00:00 2001 From: Thomas Lambert Date: Mon, 1 May 2023 22:48:14 +0200 Subject: [PATCH] fix: paste image error with os.execute (closes #241) --- lua/telekasten.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/telekasten.lua b/lua/telekasten.lua index 55c812e..95d6ed3 100644 --- a/lua/telekasten.lua +++ b/lua/telekasten.lua @@ -403,7 +403,7 @@ local function imgFromClipboard() local relpath = make_relative_path(vim.fn.expand("%:p"), png, "/") local result = os.execute(get_paste_command(pngdir, pngname)) - if result > 0 then + if not result then vim.api.nvim_err_writeln( string.format( "Unable to write image %s (exit code: %d). Is there an image on the clipboard? ",