aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim-treesitter/indent.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/indent.lua b/lua/nvim-treesitter/indent.lua
index 40c0cda46..80e0bc77b 100644
--- a/lua/nvim-treesitter/indent.lua
+++ b/lua/nvim-treesitter/indent.lua
@@ -124,7 +124,7 @@ function M.get_indent(lnum)
-- some languages like Python will actually have worse results when re-parsing at opened new line
if not M.avoid_force_reparsing[root_lang] then
-- Reparse in case we got triggered by ":h indentkeys"
- parser:parse()
+ parser:parse { vim.fn.line "w0" - 1, vim.fn.line "w$" - 1 }
end
-- Get language tree with smallest range around node that's not a comment parser