Skip to content
Snippets Groups Projects
Commit 1ef1e6e3 authored by George Nachman's avatar George Nachman
Browse files

Add some critical errors to catch issue 5932

parent 71c71dc0
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -904,8 +904,13 @@ static void SetAgainstGrainDim(BOOL isVertical, NSSize *dest, CGFloat value) {
PTYSession* bestResult = nil;
PTYSession* defaultResult = nil;
NSNumber *maxActivityCounter = nil;
int iterations = 0;
// Iterate over every possible adjacent session and select the most recently active one.
while (offset < myRect.size.height) {
if (iterations++ > 100000) {
ITCriticalError(iterations > 100000, @"Too many iterations finding session %@ in %@", session, [root_ iterm_recursiveDescription]);
return nil;
}
targetPoint = origPoint;
targetPoint.y += offset;
PTYSession* result;
Loading
Loading
@@ -944,7 +949,10 @@ static void SetAgainstGrainDim(BOOL isVertical, NSSize *dest, CGFloat value) {
}
targetPoint.y += [root_ dividerThickness];
}
if (!result) {
ITCriticalError(!result, @"Failed to find adjacent session to %@ with %@", session, [root_ iterm_recursiveDescription]);
return nil;
}
// Advance offset to next sibling's origin.
NSRect rootRelativeResultRect = [root_ convertRect:[[result view] frame]
fromView:[[result view] superview]];
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment