Skip to content

Commit

Permalink
fix required_size implementation of signature help
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
2 people authored and Schuyler Mortimer committed Jul 10, 2024
1 parent b02d202 commit 1900d43
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions helix-term/src/ui/lsp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down

0 comments on commit 1900d43

Please sign in to comment.