aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextViewAdditions.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-04-19 23:06:58 +0000
committerstuconnolly <stuart02@gmail.com>2009-04-19 23:06:58 +0000
commit51b50e943dea3cfd00eb8d49c67044ec7862f405 (patch)
tree01c295a1f23d0ae57955423ed40a97a242b5de13 /Source/SPTextViewAdditions.m
parent729a8ba1c4d8ffe72d9f43addb5afac78b1df599 (diff)
downloadsequelpro-51b50e943dea3cfd00eb8d49c67044ec7862f405.tar.gz
sequelpro-51b50e943dea3cfd00eb8d49c67044ec7862f405.tar.bz2
sequelpro-51b50e943dea3cfd00eb8d49c67044ec7862f405.zip
- Build upon documentation lookup by looking up exact manual pages that correspond to the current MySQL server version as well as allowing the lookup to be performed without actually having the keyword highlighted. Thanks to Hans-Jörg for suggesting these.
- Credit Alex King for providing the original documentation lookup code.
Diffstat (limited to 'Source/SPTextViewAdditions.m')
-rw-r--r--Source/SPTextViewAdditions.m6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/SPTextViewAdditions.m b/Source/SPTextViewAdditions.m
index 885e51df..38560b31 100644
--- a/Source/SPTextViewAdditions.m
+++ b/Source/SPTextViewAdditions.m
@@ -31,8 +31,11 @@
*/
- (NSRange)getRangeForCurrentWord
{
-
NSRange curRange = [self selectedRange];
+
+ if (curRange.length)
+ return curRange;
+
unsigned long curLocation = curRange.location;
[self moveWordLeft:self];
@@ -57,7 +60,6 @@
[self setSelectedRange:curRange];
return(wordRange);
-
}
/*