From 2d6c795da8a79126bb25c646f43369df02593f19 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 5 Jan 2011 09:20:00 +0000 Subject: =?UTF-8?q?=E2=80=A2=20enabled=20Bundle=20main=20menu=20=E2=80=A2?= =?UTF-8?q?=20improved=20rendering=20of=20line=20number=20display=20in=20Q?= =?UTF-8?q?uery=20Editor=20and=20Bundle=20command=20text=20view=20after=20?= =?UTF-8?q?scrolling=20to=20avoid=20displaying=20them=20unreadable?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/SPBundleCommandTextView.m | 10 ++++++++++ Source/SPTextView.m | 2 ++ 2 files changed, 12 insertions(+) (limited to 'Source') 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 diff --git a/Source/SPTextView.m b/Source/SPTextView.m index af4356a2..dd582e59 100644 --- a/Source/SPTextView.m +++ b/Source/SPTextView.m @@ -3029,6 +3029,8 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse) if(![[self textStorage] changeInLength]) [self performSelector:@selector(doSyntaxHighlighting) withObject:nil afterDelay:0.4]; } + else + [[scrollView contentView] display]; } -- cgit v1.2.3