diff options
| author | Thomas Vigouroux <tomvig38@gmail.com> | 2020-11-03 21:08:36 +0100 |
|---|---|---|
| committer | Thomas Vigouroux <tomvig38@gmail.com> | 2020-11-03 21:16:51 +0100 |
| commit | 6eca8d2f3860e7d76b0b524877c13206c2900b01 (patch) | |
| tree | 2175e9c40c4343ceab56c12516d914bd4c2e421e /lua/nvim-treesitter/incremental_selection.lua | |
| parent | 💣 !! Use TSUpdate !! Fix ruby queries (diff) | |
| download | nvim-treesitter-6eca8d2f3860e7d76b0b524877c13206c2900b01.tar nvim-treesitter-6eca8d2f3860e7d76b0b524877c13206c2900b01.tar.gz nvim-treesitter-6eca8d2f3860e7d76b0b524877c13206c2900b01.tar.bz2 nvim-treesitter-6eca8d2f3860e7d76b0b524877c13206c2900b01.tar.lz nvim-treesitter-6eca8d2f3860e7d76b0b524877c13206c2900b01.tar.xz nvim-treesitter-6eca8d2f3860e7d76b0b524877c13206c2900b01.tar.zst nvim-treesitter-6eca8d2f3860e7d76b0b524877c13206c2900b01.zip | |
parser: only use parse to get a tree
This will avoid using internal data.
Diffstat (limited to 'lua/nvim-treesitter/incremental_selection.lua')
| -rw-r--r-- | lua/nvim-treesitter/incremental_selection.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/incremental_selection.lua b/lua/nvim-treesitter/incremental_selection.lua index e40cc13cc..8f59fe4ae 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().tree:root() + local root = parsers.get_parser():parse():root() local node = root:named_descendant_for_range(csrow, cscol, cerow, cecol) ts_utils.update_selection(buf, node) if nodes and #nodes > 0 then |
