diff options
author | Bibiko <bibiko@eva.mpg.de> | 2010-10-25 10:00:40 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2010-10-25 10:00:40 +0000 |
commit | 4225c12ba967f91efb136adc63a4400422b01708 (patch) | |
tree | b5777dc4dd7114a65fffc861df95297725f10429 /Source | |
parent | bfa9ccbbe27a8ee93dd89033591c3653e6738dfd (diff) | |
download | sequelpro-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.m | 7 |
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(); } /* |