diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-07-15 15:35:42 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-07-15 15:35:42 +0000 |
commit | c213d86c13973d280e43bb4c5c380e72c50b703e (patch) | |
tree | 622c461b25ce4c2e738f1e706b6222e1d9ba20c5 /Source/CMTextView.m | |
parent | bc8d45aebfbab783517560d949a8d53e36fba990 (diff) | |
download | sequelpro-c213d86c13973d280e43bb4c5c380e72c50b703e.tar.gz sequelpro-c213d86c13973d280e43bb4c5c380e72c50b703e.tar.bz2 sequelpro-c213d86c13973d280e43bb4c5c380e72c50b703e.zip |
• initial support for ⌘/ in CustomQuery editor to (un)comment out the current query or selection by inserting "# " at the begin of each line
- Note: not yet finished completely
Diffstat (limited to 'Source/CMTextView.m')
-rw-r--r-- | Source/CMTextView.m | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/CMTextView.m b/Source/CMTextView.m index ecca0721..27fb0dab 100644 --- a/Source/CMTextView.m +++ b/Source/CMTextView.m @@ -531,6 +531,11 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) [self makeTextSizeSmaller]; return; } + if([charactersIgnMod isEqualToString:@"/"]) + { + [[[[self window] delegate] valueForKeyPath:@"customQueryInstance"] commentOutQuery]; + return; + } } // Only process for character autopairing if autopairing is enabled and a single character is being added. @@ -685,7 +690,6 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) } - /* * Handle special commands - see NSResponder.h for a sample list. * This subclass currently handles insertNewline: in order to preserve indentation |