aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-10-25 10:00:40 +0000
committerBibiko <bibiko@eva.mpg.de>2010-10-25 10:00:40 +0000
commit4225c12ba967f91efb136adc63a4400422b01708 (patch)
treeb5777dc4dd7114a65fffc861df95297725f10429 /Source
parentbfa9ccbbe27a8ee93dd89033591c3653e6738dfd (diff)
downloadsequelpro-4225c12ba967f91efb136adc63a4400422b01708.tar.gz
sequelpro-4225c12ba967f91efb136adc63a4400422b01708.tar.bz2
sequelpro-4225c12ba967f91efb136adc63a4400422b01708.zip
• improved "Select Line"
- it selects the entire current line even if it's wrapped
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTextViewAdditions.m7
1 files changed, 5 insertions, 2 deletions
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 93eccf5b..cab4382c 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -88,8 +88,11 @@
*/
- (IBAction)selectCurrentLine:(id)sender
{
- [self doCommandBySelector:@selector(moveToBeginningOfLine:)];
- [self doCommandBySelector:@selector(moveToEndOfLineAndModifySelection:)];
+ NSRange lineRange = [[self string] lineRangeForRange:[self selectedRange]];
+ if(lineRange.location != NSNotFound && lineRange.length)
+ [self setSelectedRange:lineRange];
+ else
+ NSBeep();
}
/*