diff options
author | rowanbeentje <rowan@beent.je> | 2009-04-16 23:21:40 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-04-16 23:21:40 +0000 |
commit | 93bf3137c544b66a84a5a780264abef960f8a1b9 (patch) | |
tree | 9a5a3f9a1bd4712639528a8f26242ea5d6fb0b37 /Source/CMTextView.m | |
parent | 4051d858d9e189b7c5bd0919e0bf952cb42898b8 (diff) | |
download | sequelpro-93bf3137c544b66a84a5a780264abef960f8a1b9.tar.gz sequelpro-93bf3137c544b66a84a5a780264abef960f8a1b9.tar.bz2 sequelpro-93bf3137c544b66a84a5a780264abef960f8a1b9.zip |
- Implement line numbering for CMTextView:
- Add an implementation of NoodleLineNumberView, by Paul Kim. Slightly tweaked to remove markers.
- Add to CMTextView (to enable it for other CMTextView uses, hook up the scrollView outlet to the containing scroll view)
Diffstat (limited to 'Source/CMTextView.m')
-rw-r--r-- | Source/CMTextView.m | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/CMTextView.m b/Source/CMTextView.m index f0f1567c..427c66d1 100644 --- a/Source/CMTextView.m +++ b/Source/CMTextView.m @@ -1277,6 +1277,12 @@ SYNTAX HIGHLIGHTING! autoindentIgnoresEnter = NO; autouppercaseKeywordsEnabled = YES; delBackwardsWasPressed = NO; + + lineNumberView = [[NoodleLineNumberView alloc] initWithScrollView:scrollView]; + [scrollView setVerticalRulerView:lineNumberView]; + [scrollView setHasHorizontalRuler:NO]; + [scrollView setHasVerticalRuler:YES]; + [scrollView setRulersVisible:YES]; } - (void)textStorageDidProcessEditing:(NSNotification *)notification |