From 0c0aa285115d603263ac6f2e84dfb76a4e7e634f Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Sun, 2 Jan 2022 12:31:16 -0500 Subject: [PATCH] Clear the marked line when updating the source view from a breakpoint. --- Source/BreakpointController.m | 1 + Source/DebuggerController.m | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Source/BreakpointController.m b/Source/BreakpointController.m index 362d3b8..7d7a066 100644 --- a/Source/BreakpointController.m +++ b/Source/BreakpointController.m @@ -119,6 +119,7 @@ [_sourceView setFile:[bp file]]; [_sourceView scrollToLine:[bp line]]; [_sourceView setMarkers:[_manager breakpointsForFile:bp.file]]; + [_sourceView setMarkedLine:0]; } @end diff --git a/Source/DebuggerController.m b/Source/DebuggerController.m index 057cce6..961ff92 100644 --- a/Source/DebuggerController.m +++ b/Source/DebuggerController.m @@ -307,12 +307,9 @@ */ - (void)updateSourceViewer { - NSArray* selection = [_stackArrayController selectedObjects]; - if (!selection || [selection count] < 1) + StackFrame* frame = _stackArrayController.selectedObjects.firstObject; + if (!frame) return; - if ([selection count] > 1) - NSLog(@"INVALID SELECTION"); - StackFrame* frame = [selection objectAtIndex:0]; if (!frame.loaded && self.model.connected) { [_connection loadStackFrame:frame]; -- 2.22.5