fix: prev_node nil check

This commit is contained in:
kiyan 2021-04-02 18:40:42 +02:00 committed by Kiyan
parent 052590ae55
commit 7deedc4939

View file

@ -73,7 +73,7 @@ function M.get_indent(lnum)
end
-- nodes can be marked @return to prevent using them
if not q.returns[node_fmt(prev_node)] then
if prev_node and not q.returns[node_fmt(prev_node)] then
local row = prev_node:start()
local end_row = prev_node:end_()