aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextView.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2011-01-06 18:13:08 +0000
committerBibiko <bibiko@eva.mpg.de>2011-01-06 18:13:08 +0000
commitcc9be0fd6dd193db4615a6a5a94913a3c7b56a68 (patch)
tree02cf3a2193faf8b45d33ab570f994562be017726 /Source/SPTextView.m
parent1bb16aa9943b686f4bf0b5adb3fe42495cf74f35 (diff)
downloadsequelpro-cc9be0fd6dd193db4615a6a5a94913a3c7b56a68.tar.gz
sequelpro-cc9be0fd6dd193db4615a6a5a94913a3c7b56a68.tar.bz2
sequelpro-cc9be0fd6dd193db4615a6a5a94913a3c7b56a68.zip
• trial to fix boundsDidChangeNotification for logs 1894, 1900, 1901
Diffstat (limited to 'Source/SPTextView.m')
-rw-r--r--Source/SPTextView.m8
1 files changed, 4 insertions, 4 deletions
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]];
}