Clear the marked line when updating the source view from a breakpoint.
authorRobert Sesek <rsesek@bluestatic.org>
Sun, 2 Jan 2022 17:31:16 +0000 (12:31 -0500)
committerRobert Sesek <rsesek@bluestatic.org>
Sun, 2 Jan 2022 17:31:16 +0000 (12:31 -0500)
Source/BreakpointController.m
Source/DebuggerController.m

index 362d3b8bbfa269eaddc9f94eb8aacfb293ba0fbb..7d7a066073a187fe9e2712f3ac9a9499ae8507b1 100644 (file)
   [_sourceView setFile:[bp file]];
   [_sourceView scrollToLine:[bp line]];
   [_sourceView setMarkers:[_manager breakpointsForFile:bp.file]];
+  [_sourceView setMarkedLine:0];
 }
 
 @end
index 057cce62d630a087dcad8ba686dd97cc46434633..961ff92ba585e644d58e458f089227d78cf3f5c6 100644 (file)
  */
 - (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];