mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Support working with array as object value for our select base name cell
This is for the new file browser which uses array to be able to hold both a display and edit name for the items being shown and potentially edited.
This commit is contained in:
@@ -108,7 +108,10 @@
|
||||
@implementation OakSelectBasenameCell
|
||||
- (void)selectWithFrame:(NSRect)aRect inView:(NSView*)aView editor:(NSText*)aText delegate:(id)someDelegate start:(NSInteger)start length:(NSInteger)length
|
||||
{
|
||||
NSString* basename = [self.stringValue stringByDeletingPathExtension];
|
||||
NSString* path = self.stringValue;
|
||||
if([self.objectValue respondsToSelector:@selector(firstObject)])
|
||||
path = [self.objectValue firstObject];
|
||||
NSString* basename = [path stringByDeletingPathExtension];
|
||||
[super selectWithFrame:aRect inView:aView editor:aText delegate:someDelegate start:start length:(start == 0 && basename ? MIN(basename.length, length) : length)];
|
||||
}
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user