fix!: backport ac9e755 from main

Co-authored-by: Pham Huy Hoang <hoangtun0810@gmail.com>
Closes: neovim/neovim#25088
This commit is contained in:
L Lllvvuu 2023-09-10 13:53:10 -07:00 committed by Christian Clason
parent 991ae3da02
commit 15d327fe63

View file

@ -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