mirror of https://github.com/helix-editor/helix
Remove popup_border calculations from LSP Hover UI component
The Hover component is used as the inner contents of a Popup. The Popup should be doing calculations based on whether popup_borders is configured and not Hover. This fixes an issue with hover rendering when the popup border option is enabled for popups. Fixes #12742pull/12744/head
parent
28047fed7f
commit
2367b20318
|
@ -100,13 +100,11 @@ impl Component for Hover {
|
||||||
|
|
||||||
// hover content
|
// hover content
|
||||||
let contents = contents.parse(Some(&cx.editor.theme));
|
let contents = contents.parse(Some(&cx.editor.theme));
|
||||||
let contents_area = area
|
let contents_area = area.clip_top(if self.hovers.len() > 1 {
|
||||||
.clip_top(if self.hovers.len() > 1 {
|
HEADER_HEIGHT + SEPARATOR_HEIGHT
|
||||||
HEADER_HEIGHT + SEPARATOR_HEIGHT
|
} else {
|
||||||
} else {
|
0
|
||||||
0
|
});
|
||||||
})
|
|
||||||
.clip_bottom(u16::from(cx.editor.popup_border()));
|
|
||||||
let contents_para = Paragraph::new(&contents)
|
let contents_para = Paragraph::new(&contents)
|
||||||
.wrap(Wrap { trim: false })
|
.wrap(Wrap { trim: false })
|
||||||
.scroll((cx.scroll.unwrap_or_default() as u16, 0));
|
.scroll((cx.scroll.unwrap_or_default() as u16, 0));
|
||||||
|
|
Loading…
Reference in New Issue