feat(iferr): add *-message* support
This commit is contained in:
parent
bb31271311
commit
a76ec8dfdc
5 changed files with 43 additions and 1 deletions
|
|
@ -15,7 +15,13 @@ function iferr.iferr()
|
|||
local pos = vim.fn.getcurpos()[2]
|
||||
local fpath = vim.fn.expand "%"
|
||||
|
||||
local rs = r.sync({ c.commands.iferr, "-pos", curb }, {
|
||||
local cmd = { c.commands.iferr, "-pos", curb }
|
||||
if c.iferr.message ~= nil and type(c.iferr.message) == "string" then
|
||||
table.insert(cmd, "-message")
|
||||
table.insert(cmd, c.iferr.message)
|
||||
end
|
||||
|
||||
local rs = r.sync(cmd, {
|
||||
stdin = u.readfile_joined(fpath),
|
||||
})
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue