diff options
Diffstat (limited to 'Source/SPBundleCommandTextView.m')
-rw-r--r-- | Source/SPBundleCommandTextView.m | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/SPBundleCommandTextView.m b/Source/SPBundleCommandTextView.m index 6411ccfd..d467da46 100644 --- a/Source/SPBundleCommandTextView.m +++ b/Source/SPBundleCommandTextView.m @@ -60,6 +60,7 @@ // add NSViewBoundsDidChangeNotification to scrollView [[commandScrollView contentView] setPostsBoundsChangedNotifications:YES]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(boundsDidChangeNotification:) name:@"NSViewBoundsDidChangeNotification" object:[commandScrollView contentView]]; // disabled to get the current text range in textView safer [[self layoutManager] setBackgroundLayoutEnabled:NO]; @@ -781,6 +782,15 @@ textWasChanged = YES; } +/** + * Scrollview delegate after the command textView's view port was changed. + * Manily used to render line numbering. + */ +- (void)boundsDidChangeNotification:(NSNotification *)notification +{ + [commandScrollView display]; +} + #pragma mark - // Store the font in the prefs for selected delegates only |