aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.m
diff options
context:
space:
mode:
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