From 808765a6c8cde93621f656fa61b0c6223928f51e Mon Sep 17 00:00:00 2001 From: Thomas Vigouroux Date: Mon, 23 Nov 2020 19:46:27 +0100 Subject: fix: update interface following languagetree merge (#687) --- lua/nvim-treesitter/ts_utils.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/nvim-treesitter/ts_utils.lua') diff --git a/lua/nvim-treesitter/ts_utils.lua b/lua/nvim-treesitter/ts_utils.lua index b235c013..a7c38feb 100644 --- a/lua/nvim-treesitter/ts_utils.lua +++ b/lua/nvim-treesitter/ts_utils.lua @@ -116,7 +116,7 @@ end function M.get_node_at_cursor(winnr) if not parsers.has_parser() then return end local cursor = api.nvim_win_get_cursor(winnr or 0) - local root = parsers.get_parser():parse():root() + local root = parsers.get_parser():parse()[1]:root() return root:named_descendant_for_range(cursor[1]-1,cursor[2],cursor[1]-1,cursor[2]) end -- cgit v1.2.3