diff options
author | mtvee <emptyvee@gmail.com> | 2009-07-14 13:43:15 +0000 |
---|---|---|
committer | mtvee <emptyvee@gmail.com> | 2009-07-14 13:43:15 +0000 |
commit | 6686223d2c30a7b99b8de11a8659851725f6326f (patch) | |
tree | 8a8608533e6cd45acc915fb382a51c75a654be85 | |
parent | 867d926446e61b794b74a142f7a706f49c3b59a4 (diff) | |
download | sequelpro-6686223d2c30a7b99b8de11a8659851725f6326f.tar.gz sequelpro-6686223d2c30a7b99b8de11a8659851725f6326f.tar.bz2 sequelpro-6686223d2c30a7b99b8de11a8659851725f6326f.zip |
- changed history and favorite selection to insert rather then overwrite query editor buffer
-rw-r--r-- | Source/CustomQuery.m | 15 |
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]]; } /* |