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 #12742
This commit is contained in:
Michael Davis 2025-01-31 11:58:53 -05:00
parent 28047fed7f
commit 2367b20318
No known key found for this signature in database

View file

@ -100,13 +100,11 @@ impl Component for Hover {
// hover content
let contents = contents.parse(Some(&cx.editor.theme));
let contents_area = area
.clip_top(if self.hovers.len() > 1 {
HEADER_HEIGHT + SEPARATOR_HEIGHT
} else {
0
})
.clip_bottom(u16::from(cx.editor.popup_border()));
let contents_area = area.clip_top(if self.hovers.len() > 1 {
HEADER_HEIGHT + SEPARATOR_HEIGHT
} else {
0
});
let contents_para = Paragraph::new(&contents)
.wrap(Wrap { trim: false })
.scroll((cx.scroll.unwrap_or_default() as u16, 0));