Skip to content

Commit c8c80e0

Browse files
UnboundVariableUnboundVariable
andauthored
[ty] Fix bug #879 in signature help (#19542)
This PR fixes bug [#879](astral-sh/ty#879) where the signature help popup remains visible after typing the closing paren in a call expression. Co-authored-by: UnboundVariable <[email protected]>
1 parent 4bc34b8 commit c8c80e0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

crates/ty_ide/src/signature_help.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ pub fn signature_help(db: &dyn Db, file: File, offset: TextSize) -> Option<Signa
6666
// Get the call expression at the given position.
6767
let (call_expr, current_arg_index) = get_call_expr(&parsed, offset)?;
6868

69+
if offset >= call_expr.end() {
70+
return None;
71+
}
72+
6973
// Get signature details from the semantic analyzer.
7074
let signature_details: Vec<CallSignatureDetails<'_>> =
7175
call_signature_details(db, file, call_expr);

0 commit comments

Comments
 (0)