aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-04-21 07:17:15 +0000
committerBibiko <bibiko@eva.mpg.de>2009-04-21 07:17:15 +0000
commitf5570a3b665da74a221af92eec8b11a13fbbdb6e (patch)
tree06db91f267b8373be99080a36fe3031e0ccf4be7 /Source/CMTextView.m
parentd80515ceb26102a1fe06ed0e55e86dcb1778aa0e (diff)
downloadsequelpro-f5570a3b665da74a221af92eec8b11a13fbbdb6e.tar.gz
sequelpro-f5570a3b665da74a221af92eec8b11a13fbbdb6e.tar.bz2
sequelpro-f5570a3b665da74a221af92eec8b11a13fbbdb6e.zip
• added - (unsigned int) getLineNumberForCharacterIndex:(unsigned int)anIndex;
Diffstat (limited to 'Source/CMTextView.m')
-rw-r--r--Source/CMTextView.m8
1 files changed, 8 insertions, 0 deletions
diff --git a/Source/CMTextView.m b/Source/CMTextView.m
index b6bb1229..05df273a 100644
--- a/Source/CMTextView.m
+++ b/Source/CMTextView.m
@@ -48,6 +48,14 @@ YY_BUFFER_STATE yy_scan_string (const char *);
@implementation CMTextView
/*
+ * Returns the associated line number for a character position inside of the CMTextView
+ */
+- (unsigned int) getLineNumberForCharacterIndex:(unsigned int)anIndex
+{
+ return [lineNumberView lineNumberForCharacterIndex:anIndex inText:[self string]]+1;
+}
+
+/*
* Add a menu item to context menu for looking up mysql documentation.
*/
- (NSMenu *)menuForEvent:(NSEvent *)event