fix: fix iferr config (#56)
This commit is contained in:
parent
bbe89312c5
commit
8a6f7748ef
2 changed files with 3 additions and 3 deletions
|
|
@ -20,7 +20,7 @@ local default_config = {
|
||||||
iferr = "iferr",
|
iferr = "iferr",
|
||||||
dlv = "dlv",
|
dlv = "dlv",
|
||||||
},
|
},
|
||||||
---@class gopjer.ConfigGotests
|
---@class gopher.ConfigGotests
|
||||||
gotests = {
|
gotests = {
|
||||||
-- gotests doesn't have template named "default" so this plugin uses "default" to set the default template
|
-- gotests doesn't have template named "default" so this plugin uses "default" to set the default template
|
||||||
template = "default",
|
template = "default",
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
local c = require("gopher.config").commands
|
local c = require "gopher.config"
|
||||||
local iferr = {}
|
local iferr = {}
|
||||||
|
|
||||||
-- That's Lua of vimscript implementation of: github.com/koron/iferr
|
-- That's Lua of vimscript implementation of: github.com/koron/iferr
|
||||||
|
|
@ -6,7 +6,7 @@ function iferr.iferr()
|
||||||
local boff = vim.fn.wordcount().cursor_bytes
|
local boff = vim.fn.wordcount().cursor_bytes
|
||||||
local pos = vim.fn.getcurpos()[2]
|
local pos = vim.fn.getcurpos()[2]
|
||||||
|
|
||||||
local data = vim.fn.systemlist((c.iferr .. " -pos " .. boff), vim.fn.bufnr "%")
|
local data = vim.fn.systemlist((c.commands.iferr .. " -pos " .. boff), vim.fn.bufnr "%")
|
||||||
if vim.v.shell_error ~= 0 then
|
if vim.v.shell_error ~= 0 then
|
||||||
error("iferr failed: " .. data)
|
error("iferr failed: " .. data)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue