remove extra line, remove () in error

This commit is contained in:
smolck 2021-02-04 08:27:38 -06:00 committed by GitHub
parent e65d0e53b1
commit 2d06538b5e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,14 +256,13 @@ vim.fn = setmetatable({}, {
local _fn
if vim.api[key] ~= nil then
_fn = function(...)
error(string.format("Tried to call API function with vim.fn: use vim.api.%s() instead", key))
error(string.format("Tried to call API function with vim.fn: use vim.api.%s instead", key))
end
else
_fn = function(...)
return vim.call(key, ...)
end
end
t[key] = _fn
return _fn
end