aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMTextView.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-04-16 23:21:40 +0000
committerrowanbeentje <rowan@beent.je>2009-04-16 23:21:40 +0000
commit93bf3137c544b66a84a5a780264abef960f8a1b9 (patch)
tree9a5a3f9a1bd4712639528a8f26242ea5d6fb0b37 /Source/CMTextView.m
parent4051d858d9e189b7c5bd0919e0bf952cb42898b8 (diff)
downloadsequelpro-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.m6
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