diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPBundleCommandTextView.m | 4 | ||||
-rw-r--r-- | Source/SPTextView.m | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Source/SPBundleCommandTextView.m b/Source/SPBundleCommandTextView.m index cd6e5706..d9aae0f7 100644 --- a/Source/SPBundleCommandTextView.m +++ b/Source/SPBundleCommandTextView.m @@ -31,8 +31,8 @@ - (void)dealloc { - [prefs removeObserver:self forKeyPath:SPCustomQueryEditorTabStopWidth]; [[NSNotificationCenter defaultCenter] removeObserver:self]; + [prefs removeObserver:self forKeyPath:SPCustomQueryEditorTabStopWidth]; [prefs release]; [lineNumberView release]; } @@ -62,7 +62,7 @@ [[self layoutManager] setBackgroundLayoutEnabled:NO]; // add NSViewBoundsDidChangeNotification to scrollView - [[commandScrollView contentView] setPostsBoundsChangedNotifications:YES]; + [commandScrollView setPostsBoundsChangedNotifications:YES]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(boundsDidChangeNotification:) name:NSViewBoundsDidChangeNotification object:[commandScrollView contentView]]; } diff --git a/Source/SPTextView.m b/Source/SPTextView.m index 97037e0b..4867597a 100644 --- a/Source/SPTextView.m +++ b/Source/SPTextView.m @@ -152,7 +152,7 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) [[self layoutManager] setBackgroundLayoutEnabled:NO]; // add NSViewBoundsDidChangeNotification to scrollView - [[scrollView contentView] setPostsBoundsChangedNotifications:YES]; + [scrollView setPostsBoundsChangedNotifications:YES]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(boundsDidChangeNotification:) name:NSViewBoundsDidChangeNotification object:[scrollView contentView]]; [self setQueryHiliteColor:[NSUnarchiver unarchiveObjectWithData:[prefs dataForKey:SPCustomQueryEditorHighlightQueryColor]]]; @@ -3013,9 +3013,9 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) /** * Scrollview delegate after the textView's view port was changed. - * Manily used to update the syntax highlighting for a large text size. + * Manily used to update the syntax highlighting for a large text size and line numbering rendering. */ -- (void) boundsDidChangeNotification:(NSNotification *)notification +- (void)boundsDidChangeNotification:(NSNotification *)notification { // Invoke syntax highlighting if text view port was changed for large text if(startListeningToBoundChanges && [[self string] length] > SP_TEXT_SIZE_TRIGGER_FOR_PARTLY_PARSING) @@ -3028,7 +3028,7 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) [self performSelector:@selector(doSyntaxHighlighting) withObject:nil afterDelay:0.4]; } else - [[scrollView contentView] display]; + [scrollView displayRect:[scrollView visibleRect]]; } |