Skip to content

Commit 4b1ae8a

Browse files
klenNTBBloodbath
authored andcommitted
fix: undefined api
1 parent 761bd07 commit 4b1ae8a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/rest-nvim/utils/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ end
9292

9393
M.get_node_value = function(node, bufnr)
9494
local start_row, start_col, _, end_col = node:range()
95-
local line = api.nvim_buf_get_lines(bufnr, start_row, start_row + 1, false)[1]
95+
local line = vim.api.nvim_buf_get_lines(bufnr, start_row, start_row + 1, false)[1]
9696
return line and string.sub(line, start_col + 1, end_col):gsub('^["\'](.*)["\']$', '%1') or nil
9797
end
9898

0 commit comments

Comments
 (0)