diff options
author | Bibiko <bibiko@eva.mpg.de> | 2009-04-21 07:17:15 +0000 |
---|---|---|
committer | Bibiko <bibiko@eva.mpg.de> | 2009-04-21 07:17:15 +0000 |
commit | f5570a3b665da74a221af92eec8b11a13fbbdb6e (patch) | |
tree | 06db91f267b8373be99080a36fe3031e0ccf4be7 /Source/CMTextView.m | |
parent | d80515ceb26102a1fe06ed0e55e86dcb1778aa0e (diff) | |
download | sequelpro-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.m | 8 |
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 |