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/incremental_selection.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lua/nvim-treesitter/incremental_selection.lua') diff --git a/lua/nvim-treesitter/incremental_selection.lua b/lua/nvim-treesitter/incremental_selection.lua index 8f59fe4a..fa833f90 100644 --- a/lua/nvim-treesitter/incremental_selection.lua +++ b/lua/nvim-treesitter/incremental_selection.lua @@ -43,7 +43,7 @@ local function select_incremental(get_parent) local csrow, cscol, cerow, cecol = visual_selection_range() -- Initialize incremental selection with current selection if not nodes or #nodes == 0 or not range_matches(nodes[#nodes]) then - local root = parsers.get_parser():parse():root() + local root = parsers.get_parser():parse()[1]:root() local node = root:named_descendant_for_range(csrow, cscol, cerow, cecol) ts_utils.update_selection(buf, node) if nodes and #nodes > 0 then -- cgit v1.2.3