Skip to content

Commit 45f9691

Browse files
committed
Do not wrap context depth and make max 9
1 parent cd05b51 commit 45f9691

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ main
1010
- Fix position of closing braces in context view
1111
- Show historic inline values
1212
- Do not show "undefined" variables
13+
- Ensure context depth is in range of 1-9
1314

1415
0.1.1
1516
-----

src/app.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,8 @@ impl App {
475475
self.exec_continuation(AppEvent::Run).await;
476476
}
477477
AppEvent::ContextDepth(inc) => {
478-
let depth = self.context_depth;
479-
self.context_depth = depth.wrapping_add(inc as u16);
478+
let depth = self.context_depth.clone();
479+
self.context_depth = depth.wrapping_add(inc as u16).max(1).min(9);
480480
self.client
481481
.lock()
482482
.await

0 commit comments

Comments
 (0)