summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-27 17:25:01 +0200
committerLaurenz <laurmaedje@gmail.com>2023-03-27 17:25:01 +0200
commitb0f87077cc70f470e0680e0e932747dbe9df9c3b (patch)
tree981a9bc77fc3a3b9423a4ed5621263aefc2e86da /src
parente724d0425352e5762998667a4fe6a066678318d7 (diff)
Fix hovering over comments
Diffstat (limited to 'src')
-rw-r--r--src/ide/tooltip.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ide/tooltip.rs b/src/ide/tooltip.rs
index b1107469..b17a1acc 100644
--- a/src/ide/tooltip.rs
+++ b/src/ide/tooltip.rs
@@ -21,6 +21,9 @@ pub fn tooltip(
cursor: usize,
) -> Option<Tooltip> {
let leaf = LinkedNode::new(source.root()).leaf_at(cursor)?;
+ if leaf.kind().is_trivia() {
+ return None;
+ }
named_param_tooltip(world, &leaf)
.or_else(|| font_tooltip(world, &leaf))