From 1592502a94cc47d88938462b8d9581a22cc8937c Mon Sep 17 00:00:00 2001 From: Oleksandr Smirnov Date: Wed, 26 Feb 2025 19:35:58 +0200 Subject: [PATCH] refactor: change split function --- lua/gopher/iferr.lua | 4 ++-- lua/gopher/impl.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/gopher/iferr.lua b/lua/gopher/iferr.lua index 775edc7..a352969 100644 --- a/lua/gopher/iferr.lua +++ b/lua/gopher/iferr.lua @@ -26,11 +26,11 @@ function iferr.iferr() return end - log.error("ferr: failed. output: " .. vim.inspect(rs.stderr)) + log.error("ferr: failed. output: " .. rs.stderr) error("iferr failed: " .. rs.stderr) end - vim.fn.append(pos, vim.fn.split(rs.stdout, "\n")) + vim.fn.append(pos, vim.split(rs.stdout, "\n")) vim.cmd [[silent normal! j=2j]] vim.fn.setpos(".", pos) end diff --git a/lua/gopher/impl.lua b/lua/gopher/impl.lua index 7bc49d6..3e96166 100644 --- a/lua/gopher/impl.lua +++ b/lua/gopher/impl.lua @@ -88,7 +88,7 @@ function impl.impl(...) end local pos = vim.fn.getcurpos()[2] - local output = vim.fn.split(rs.stdout, "\n") + local output = vim.split(rs.stdout, "\n") table.insert(output, 1, "") vim.fn.append(pos, output)