From 8613ba118cd5a34e6ee17c3b08f7dc009fcc5045 Mon Sep 17 00:00:00 2001 From: William <50717946+BIKA-C@users.noreply.github.com> Date: Wed, 19 Apr 2023 17:29:43 -0700 Subject: [PATCH] fix(treesitter playground): wrong range of a node displayed in playground The call parameters order of the function `get_range_str` is flipped for the last two arguments compared to the declaration. --- runtime/lua/vim/treesitter/playground.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/lua/vim/treesitter/playground.lua b/runtime/lua/vim/treesitter/playground.lua index 2c0a0d1aa6..c512710810 100644 --- a/runtime/lua/vim/treesitter/playground.lua +++ b/runtime/lua/vim/treesitter/playground.lua @@ -147,7 +147,7 @@ local decor_ns = api.nvim_create_namespace('ts.playground') ---@param end_lnum integer ---@param end_col integer ---@return string -local function get_range_str(lnum, col, end_col, end_lnum) +local function get_range_str(lnum, col, end_lnum, end_col) if lnum == end_lnum then return string.format('[%d:%d - %d]', lnum + 1, col + 1, end_col) end