summaryrefslogtreecommitdiff
path: root/helix-term/src/commands.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/commands.rs')
-rw-r--r--helix-term/src/commands.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/helix-term/src/commands.rs b/helix-term/src/commands.rs
index 4910790a..1f7a2275 100644
--- a/helix-term/src/commands.rs
+++ b/helix-term/src/commands.rs
@@ -5130,8 +5130,12 @@ fn hover(cx: &mut Context) {
// skip if contents empty
let contents = ui::Markdown::new(contents, editor.syn_loader.clone());
- let popup = Popup::new(contents);
- compositor.push(Box::new(popup));
+ let popup = Popup::new("documentation", contents);
+ if let Some(doc_popup) = compositor.find_id("documentation") {
+ *doc_popup = popup;
+ } else {
+ compositor.push(Box::new(popup));
+ }
}
},
);