Fix indentation of lines within node preceding opening delimiter

This commit is contained in:
Garrett Hopper 2025-05-07 19:36:59 -05:00
parent 6a0cc56962
commit b1791bc488

View file

@ -306,7 +306,7 @@ function M.get_indent(lnum)
end end
else else
-- aligned indent -- aligned indent
if c_is_last_in_line and c_srow and o_srow ~= c_srow and c_srow < lnum - 1 then if lnum - 1 <= o_srow or (c_is_last_in_line and c_srow and o_srow ~= c_srow and c_srow < lnum - 1) then
-- If current line is outside the range of a node marked with `@aligned_indent` -- If current line is outside the range of a node marked with `@aligned_indent`
-- Then its indent level shouldn't be affected by `@aligned_indent` node -- Then its indent level shouldn't be affected by `@aligned_indent` node
indent = math.max(indent - indent_size, 0) indent = math.max(indent - indent_size, 0)