aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CustomQuery.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CustomQuery.m')
-rw-r--r--Source/CustomQuery.m15
1 files changed, 3 insertions, 12 deletions
diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m
index ecc32e3d..7dc8e4dc 100644
--- a/Source/CustomQuery.m
+++ b/Source/CustomQuery.m
@@ -168,12 +168,8 @@
[NSApp endSheet:queryFavoritesSheet];
[queryFavoritesSheet orderOut:nil];
} else if ( [queryFavoritesButton indexOfSelectedItem] != 3) {
-//choose favorite
- // Register the next action for undo
- [textView shouldChangeTextInRange:[textView selectedRange] replacementString:[queryFavoritesButton titleOfSelectedItem]];
- [textView replaceCharactersInRange:[textView selectedRange] withString:[queryFavoritesButton titleOfSelectedItem]];
- // invoke textStorageDidProcessEditing: for syntax highlighting and auto-uppercase
- [textView insertText:@""];
+ //choose favorite
+ [textView insertText:[queryFavoritesButton titleOfSelectedItem]];
}
}
@@ -182,12 +178,7 @@
*/
- (IBAction)chooseQueryHistory:(id)sender
{
- // Register the next action for undo
- [textView shouldChangeTextInRange:NSMakeRange(0,[[textView string] length]) replacementString:[queryHistoryButton titleOfSelectedItem]];
- [textView setString:[queryHistoryButton titleOfSelectedItem]];
- // Invoke textStorageDidProcessEditing: for syntax highlighting and auto-uppercase
- [textView insertText:@""];
- [textView selectAll:self];
+ [textView insertText:[queryHistoryButton titleOfSelectedItem]];
}
/*