mirror of
https://github.com/MacPass/MacPass.git
synced 2025-12-14 15:12:21 +00:00
Cmd+F Selects old search string
This commit is contained in:
@@ -314,7 +314,7 @@ NSString *const _MPTAbleSecurCellView = @"PasswordCell";
|
|||||||
if(document.selectedItem == document.selectedGroup) {
|
if(document.selectedItem == document.selectedGroup) {
|
||||||
/* If we change to a group selection, we should clear the filter */
|
/* If we change to a group selection, we should clear the filter */
|
||||||
if(_isDisplayingContextBar) {
|
if(_isDisplayingContextBar) {
|
||||||
[document exitSearch:self];
|
// nothing?
|
||||||
}
|
}
|
||||||
else if([[self.entryArrayController content] count] > 0) {
|
else if([[self.entryArrayController content] count] > 0) {
|
||||||
KPKEntry *entry = [[self.entryArrayController content] lastObject];
|
KPKEntry *entry = [[self.entryArrayController content] lastObject];
|
||||||
|
|||||||
@@ -225,13 +225,14 @@ NSString *const MPToolbarItemSearch = @"TOOLBAR_SEARCH";
|
|||||||
|
|
||||||
- (void)_didEnterSearch:(NSNotification *)notification {
|
- (void)_didEnterSearch:(NSNotification *)notification {
|
||||||
[[self.searchField window] makeFirstResponder:self.searchField];
|
[[self.searchField window] makeFirstResponder:self.searchField];
|
||||||
|
[self.searchField selectText:self];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)_didExitSearch:(NSNotification *)notification {
|
- (void)_didExitSearch:(NSNotification *)notification {
|
||||||
[self.searchField setStringValue:@""];
|
[self.searchField setStringValue:@""];
|
||||||
NSWindow *window = [self.searchField window];
|
NSWindow *window = [self.searchField window];
|
||||||
/* Resign first responder form search field only if it was the first responder */
|
/* Resign first responder form search field only if it was the first responder */
|
||||||
if([window firstResponder] == self.searchField ) {
|
if([window firstResponder] == [self.searchField currentEditor]) {
|
||||||
[window makeFirstResponder:nil];
|
[window makeFirstResponder:nil];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user