diff --git a/helix-term/src/ui/lsp.rs b/helix-term/src/ui/lsp.rs index f2854551ded05..99a88ddb0b3cd 100644 --- a/helix-term/src/ui/lsp.rs +++ b/helix-term/src/ui/lsp.rs @@ -69,7 +69,8 @@ impl Component for SignatureHelp { let (_, sig_text_height) = crate::ui::text::required_size(&sig_text, area.width); let sig_text_area = area.clip_top(1).with_height(sig_text_height); let sig_text_para = Paragraph::new(sig_text).wrap(Wrap { trim: false }); - sig_text_para.render(sig_text_area.inner(&margin), surface); + let sig_text_para = sig_text_area.inner(&margin).intersection(surface.area); + sig_text_para.render(sig_text_para, surface); if self.signature_doc.is_none() { return;