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:
parent
28047fed7f
commit
2367b20318
1 changed files with 5 additions and 7 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue