summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurenz <laurmaedje@gmail.com>2023-03-18 17:51:13 +0100
committerLaurenz <laurmaedje@gmail.com>2023-03-18 17:51:13 +0100
commit533d4d57c6b65469e39d7b5d2289df1adb9cfb64 (patch)
treea6b0bed9a0dae5fee76cb8a72cbcbefa5c4b53e0
parent5d475ae32ede2cc51e361734f186ff3d4372564a (diff)
Fix hover tooltip value collapsing
-rw-r--r--src/ide/tooltip.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/ide/tooltip.rs b/src/ide/tooltip.rs
index 0b37b7ca..b1107469 100644
--- a/src/ide/tooltip.rs
+++ b/src/ide/tooltip.rs
@@ -83,6 +83,12 @@ fn expr_tooltip(world: &(dyn World + 'static), leaf: &LinkedNode) -> Option<Tool
last = Some((value, 1));
}
+ if let Some((_, count)) = last {
+ if count > 1 {
+ write!(pieces.last_mut().unwrap(), " (x{count})").unwrap();
+ }
+ }
+
if iter.next().is_some() {
pieces.push("...".into());
}