fix random panic found while testing

This commit is contained in:
Vulpesx 2024-08-15 20:02:05 +10:00
parent 6c2b4ce26e
commit 6336ab43b3
No known key found for this signature in database
GPG Key ID: 16151F7622E4957D

View File

@ -287,7 +287,7 @@ fn execution_pause_indicator<'doc>(
) -> GutterFn<'doc> {
let style = theme.get("ui.debug.active");
let current_stack_frame = editor.current_stack_frame();
let frame_line = current_stack_frame.map(|frame| frame.line - 1);
let frame_line = current_stack_frame.and_then(|frame| frame.line.checked_sub(1));
let frame_source_path = current_stack_frame.map(|frame| {
frame
.source