summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter/incremental_selection.lua
diff options
context:
space:
mode:
authorThomas Vigouroux <tomvig38@gmail.com>2020-11-23 19:46:27 +0100
committerGitHub <noreply@github.com>2020-11-23 12:46:27 -0600
commit808765a6c8cde93621f656fa61b0c6223928f51e (patch)
treecbbe64a1649317e870297f86d89f222238a51c0a /lua/nvim-treesitter/incremental_selection.lua
parent3c07232d076d3f62919ffe1dc16409addaae82f2 (diff)
fix: update interface following languagetree merge (#687)
Diffstat (limited to 'lua/nvim-treesitter/incremental_selection.lua')
-rw-r--r--lua/nvim-treesitter/incremental_selection.lua2
1 files changed, 1 insertions, 1 deletions
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