From 731c8c13b62f8244126df043a9889c014f42e63b Mon Sep 17 00:00:00 2001 From: Luca Bilke Date: Mon, 29 Jan 2024 11:56:20 +0100 Subject: [PATCH] bugfix --- lua/taolf/main.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/taolf/main.lua b/lua/taolf/main.lua index 3950b46..e8cf4c2 100644 --- a/lua/taolf/main.lua +++ b/lua/taolf/main.lua @@ -109,6 +109,7 @@ function Lf:__set_cmd_wrapper() self.tmp_lastdir = os.tmpname() self.tmp_id = os.tmpname() + -- FIX: non existing file in buffer causes an error message local selection = self.term.dir if fn.fnamemodify(self.curfile, ":h") == self.term.dir then selection = self.curfile @@ -207,7 +208,7 @@ function Lf:__set_argv() local args = {} for _, arg in ipairs(fn.argv()) do if api.nvim_buf_is_loaded(fn.bufnr(arg)) then - table.insert(args, uv.fs_realpath(arg)) + table.insert(args, uv.fs_realpath(arg) or "") end end self.arglist = args