summaryrefslogtreecommitdiff
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
parente724d0425352e5762998667a4fe6a066678318d7 (diff)
Fix hovering over comments
-rw-r--r--docs/src/general/changelog.md1
-rw-r--r--src/ide/tooltip.rs3
2 files changed, 4 insertions, 0 deletions
diff --git a/docs/src/general/changelog.md b/docs/src/general/changelog.md
index 19e895ae..ecb23efe 100644
--- a/docs/src/general/changelog.md
+++ b/docs/src/general/changelog.md
@@ -30,6 +30,7 @@ description: |
[`location`]($func/locate) type
- Added symbols for double, triple, and quadruple dot accent
- Added smart quotes for Norwegian Bokmål
+- Fixed hovering over comments in web app
## March 21, 2023
- Reference and bibliography management
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))