We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f0199f0 commit 3344e2cCopy full SHA for 3344e2c
crates/debugger/src/tui/draw.rs
@@ -237,8 +237,9 @@ impl DebuggerContext<'_> {
237
238
// adjust what text we show of the source code
239
let (start_line, end_line) = if needed_highlight > height {
240
- // highlighted section is more lines than we have avail
241
- (before.len(), before.len() + needed_highlight)
+ // highlighted section is more lines than we have available
+ let start_line = before.len().saturating_sub(1);
242
+ (start_line, before.len() + needed_highlight)
243
} else if height > num_lines {
244
// we can fit entire source
245
(0, num_lines)
0 commit comments