From cc9be0fd6dd193db4615a6a5a94913a3c7b56a68 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Thu, 6 Jan 2011 18:13:08 +0000 Subject: =?UTF-8?q?=E2=80=A2=20trial=20to=20fix=20boundsDidChangeNotificat?= =?UTF-8?q?ion=20for=20logs=201894,=201900,=201901?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPBundleCommandTextView.m | 4 ++-- 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]]; } -- cgit v1.2.3