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/tsrange.lua | |
| parent | f999dc41131c3c69f2411af13597932c042e8e5a (diff) | |
parser: only use parse to get a tree
This will avoid using internal data.
Diffstat (limited to 'lua/nvim-treesitter/tsrange.lua')
| -rw-r--r-- | lua/nvim-treesitter/tsrange.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/tsrange.lua b/lua/nvim-treesitter/tsrange.lua index e6aa73f5..b215189f 100644 --- a/lua/nvim-treesitter/tsrange.lua +++ b/lua/nvim-treesitter/tsrange.lua @@ -57,7 +57,7 @@ end function TSRange:parent(range) local parser = parsers.get_parser(self.buf, parsers.get_buf_lang(range)) - local root = parser.tree:root() + local root = parser:parse():root() return root:named_descendant_for_range(self.start_pos[1], self.start_pos[2], self.end_pos[1], self.end_pos[2]) end |
