mirror of
https://github.com/helix-editor/helix
synced 2024-06-03 08:26:10 +02:00
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" <hichem.f@live.de>
This commit is contained in:
parent
2d6d876a23
commit
93e8c16614
|
@ -155,10 +155,7 @@ fn required_size(&mut self, viewport: (u16, u16)) -> Option<(u16, u16)> {
|
|||
|
||||
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(),
|
||||
|
|
Loading…
Reference in New Issue