From 9dfe25b8cbc528ba7088edc2b4183c71e129b8a0 Mon Sep 17 00:00:00 2001 From: Michele Campeotto Date: Sat, 22 Mar 2025 12:05:07 +0100 Subject: [PATCH] Fix crash when requesting signature help at the top level. --- src/fennel-ls/analyzer.fnl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fennel-ls/analyzer.fnl b/src/fennel-ls/analyzer.fnl index 89fabac..be286a9 100644 --- a/src/fennel-ls/analyzer.fnl +++ b/src/fennel-ls/analyzer.fnl @@ -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))))