Fix crash when requesting signature help at the top level.

This commit is contained in:
Michele Campeotto 2025-03-22 12:05:07 +01:00 committed by Phil Hagelberg
parent e504013663
commit 9dfe25b8cb

View File

@ -278,8 +278,9 @@ find the definition `10`, but if `opts.stop-early?` is set, it would find
"Find the nearest call
returns the called symbol and the argument number position points to"
(let [(_ [[call] [parent]]) (find-symbol file.ast byte)]
(if (special? parent)
(let [(_ [[call] parent-call]) (find-symbol file.ast byte)
parent (?. parent-call 1)]
(if (and parent (special? parent))
(values parent -1)
(values call -1))))