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
pascalkuthe and karthago1 committed Apr 25, 2024
1 parent 4ea2f20 commit 9573b7d
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 9573b7d

Please sign in to comment.