diff options
Diffstat (limited to 'Source/SPAppController.m')
-rw-r--r-- | Source/SPAppController.m | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/SPAppController.m b/Source/SPAppController.m index 24b981af..c7412419 100644 --- a/Source/SPAppController.m +++ b/Source/SPAppController.m @@ -1323,11 +1323,9 @@ if([firstResponder numberOfSelectedRows]) { NSMutableArray *sel = [NSMutableArray array]; NSIndexSet *selectedRows = [firstResponder selectedRowIndexes]; - NSUInteger rowIndex = [selectedRows firstIndex]; - while ( rowIndex != NSNotFound ) { + [selectedRows enumerateIndexesUsingBlock:^(NSUInteger rowIndex, BOOL * _Nonnull stop) { [sel addObject:[NSString stringWithFormat:@"%ld", (long)rowIndex]]; - rowIndex = [selectedRows indexGreaterThanIndex:rowIndex]; - } + }]; [env setObject:[sel componentsJoinedByString:@"\t"] forKey:SPBundleShellVariableSelectedRowIndices]; } |