mirror of
https://github.com/textmate/textmate.git
synced 2026-01-22 21:27:56 -05:00
Find in Folder: ⌘1-n selects first match
Previously we would select the n’th file in the result list so one would have to then use arrow down to get to the first match of this file. Now we go directly to the first match in the file (unless the matches for the item is collapsed).
This commit is contained in:
@@ -329,7 +329,8 @@ struct operation_t
|
||||
if([match.path isEqualToString:path])
|
||||
{
|
||||
NSUInteger row = [findAllResultsOutlineView rowForItem:match];
|
||||
[findAllResultsOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:row] byExtendingSelection:NO];
|
||||
NSUInteger firstMatch = row + ([findAllResultsOutlineView isItemExpanded:match] ? 1 : 0);
|
||||
[findAllResultsOutlineView selectRowIndexes:[NSIndexSet indexSetWithIndex:firstMatch] byExtendingSelection:NO];
|
||||
[[findAllResultsOutlineView window] makeFirstResponder:findAllResultsOutlineView];
|
||||
[findAllResultsOutlineView scrollRowToVisible:findAllResultsOutlineView.numberOfRows-1];
|
||||
[findAllResultsOutlineView scrollRowToVisible:row];
|
||||
|
||||
Reference in New Issue
Block a user