From 307e582b2a4ac017e0dc6be27cddff5b4f1dbd6a Mon Sep 17 00:00:00 2001 From: Horacio Sanson <900716+hsanson@users.noreply.github.com> Date: Thu, 14 Mar 2024 11:05:15 +0900 Subject: [PATCH] Fix find entry via treesitter (#124) * Fix HurlRunnterToEntry using treesitter * chore(doc): auto generate docs * Fix find entry method returing two nodes range. Lua index starts on 1 so we were accidentally returing the line range of the current node plus one line of the next node. * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: github-actions[bot] Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- lua/hurl/http_utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/hurl/http_utils.lua b/lua/hurl/http_utils.lua index 0927a20..4e3ae7b 100644 --- a/lua/hurl/http_utils.lua +++ b/lua/hurl/http_utils.lua @@ -45,7 +45,7 @@ local function find_hurl_entry_positions_in_buffer() return { current = current_node_idx, start_line = r1 + 1, - end_line = r2 + 1, + end_line = r2, } end end