Skip to content

Commit e9ab3d8

Browse files
committed
Detect presence of NSCellUndoManager
1 parent 116e0ee commit e9ab3d8

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Source/NSCell.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@
7575
#import "GSGuiPrivate.h"
7676
#import "AppKit/NSTextFieldCell.h"
7777
#import "AppKit/NSSearchFieldCell.h"
78+
79+
// Use NSAppleEventDescriptor as a proxy for detecting the Eggplant fork of libs-base
80+
#if !__has_include("Foundation/NSAppleEventDescriptor.h")
81+
#define HAVE_NSCellUndoManager
82+
#endif
83+
7884
static Class colorClass;
7985
static Class cellClass;
8086
static Class fontClass;
@@ -2356,6 +2362,7 @@ incorrectly be reduced to zero (since the text object has no contents at
23562362
_cell.in_editing = YES;
23572363

23582364
// TESTPLANT-MAL-12282916: Paul Landers added this code...need to keep it...
2365+
#ifdef HAVE_NSCellUndoManager
23592366
if ([textObject isKindOfClass:[NSTextView class]])
23602367
{
23612368
NSCellUndoManager * undoManager = [[NSCellUndoManager alloc] init];
@@ -2364,7 +2371,7 @@ incorrectly be reduced to zero (since the text object has no contents at
23642371
[undoManager release];
23652372
[(NSTextView *)textObject setAllowsUndo:YES];
23662373
}
2367-
2374+
#endif
23682375

23692376
#if 1
23702377
// Testplant-MAL-2015-06-20: merging removal causes focus ring issues...

0 commit comments

Comments
 (0)