From c569296070de5c4049cb3ea69f3395c2b2914c34 Mon Sep 17 00:00:00 2001 From: bhagwan Date: Sun, 12 Dec 2021 18:52:13 -0800 Subject: [PATCH] internal: replace error messages from 'io.write' to 'io.stderr:write' --- lua/fzf-lua/make_entry.lua | 2 +- lua/fzf-lua/shell_helper.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/fzf-lua/make_entry.lua b/lua/fzf-lua/make_entry.lua index 41779a0..66cbf24 100644 --- a/lua/fzf-lua/make_entry.lua +++ b/lua/fzf-lua/make_entry.lua @@ -40,7 +40,7 @@ local function load_config_section(s, datatype) vim.fn.chanclose(chan_id) end) if not ok then - io.write(("Error loading remote config section '%s': %s\n") + io.stderr:write(("Error loading remote config section '%s': %s\n") :format(s, errmsg)) elseif type(res) == datatype then return res diff --git a/lua/fzf-lua/shell_helper.lua b/lua/fzf-lua/shell_helper.lua index cd2a400..74f610e 100644 --- a/lua/fzf-lua/shell_helper.lua +++ b/lua/fzf-lua/shell_helper.lua @@ -64,6 +64,6 @@ local success, errmsg = pcall(function () end) if not success then - io.write("FzfLua Error:\n\n" .. errmsg .. "\n") + io.stderr:write("FzfLua Error:\n\n" .. errmsg .. "\n") vim.cmd [[qall]] end