Unnamed repository; edit this file 'description' to name the repository.
fix required_size implementation of signature help
Trunctation should always be handled by the parent. Returning None is
only supposed to indicate a missing implementation
Co-authored-by: Ben Fekih, Hichem" <[email protected]>
| -rw-r--r-- | helix-term/src/ui/lsp.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/helix-term/src/ui/lsp.rs b/helix-term/src/ui/lsp.rs index d53437ec..b82f7be2 100644 --- a/helix-term/src/ui/lsp.rs +++ b/helix-term/src/ui/lsp.rs @@ -155,10 +155,7 @@ impl Component for SignatureHelp { let sig = &self.signatures[self.active_signature]; - if PADDING >= viewport.1 || PADDING >= viewport.0 { - return None; - } - let max_text_width = (viewport.0 - PADDING).min(120); + let max_text_width = viewport.0.saturating_sub(PADDING).clamp(10, 120); let signature_text = crate::ui::markdown::highlighted_code_block( sig.signature.as_str(), |