From ac6a016fdefa686fbb89cc57df3cc474c78f5e49 Mon Sep 17 00:00:00 2001 From: Sergey Fedorov Date: Fri, 17 Jan 2025 06:47:04 +0800 Subject: [PATCH 3/5] Revert "Suppress 'Expected min height of view' macOS warning" This reverts commit 54b786054e8776c386afad7030669890a04898b5. --- RController.m | 14 -------------- 1 file changed, 14 deletions(-) diff --git RController.m RController.m index 92ee414..7ada3d3 100644 --- RController.m +++ RController.m @@ -2091,20 +2091,6 @@ outputType: 0 = stdout, 1 = stderr, 2 = stdout/err as root NSColor *color=(outputType==0)?[consoleColors objectAtIndex:iStdoutColor]:((outputType==1)?[consoleColors objectAtIndex:iStderrColor]:[consoleColors objectAtIndex:iRootColor]); if (len>=0 && buf[len]!=0) buf[len]=0; /* this MAY be dangerous ... */ NSString *s = [[NSString alloc] initWithUTF8String:buf]; - if (outputType == 1) { - // FIXME horrible, horrible hack - this warning seems to be a macOS bug, because - // we never create NSPopoverTouchBarItemButton, so we suppress it in the console - // by removing a line with that content - NSRange r = [s rangeOfString:@"Warning: Expected min height of view: .* to be less than or equal to " options:NSRegularExpressionSearch]; - if (r.location != NSNotFound) { - NSString *os = s; - NSUInteger start, end; - [s getLineStart:&start end:&end contentsEnd:0 forRange:r]; - s = [os stringByReplacingCharactersInRange:NSMakeRange(start, end-start) withString:@""]; - [s retain]; - [os release]; - } - } [self flushROutput]; [self writeConsoleDirectly:s withColor:color]; [s release]; -- 2.48.0