Unnamed repository; edit this file 'description' to name the repository.
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
Michael Davis 2025-02-01
parent 28047fe · commit 2367b20
-rw-r--r--helix-term/src/ui/lsp/hover.rs12
1 files changed, 5 insertions, 7 deletions
diff --git a/helix-term/src/ui/lsp/hover.rs b/helix-term/src/ui/lsp/hover.rs
index bc50037b..4010ff1b 100644
--- a/helix-term/src/ui/lsp/hover.rs
+++ b/helix-term/src/ui/lsp/hover.rs
@@ -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));