From 2fd4f33f9e651d96ef00169418224aab97d27ecf Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Wed, 12 Jan 2011 17:41:29 -0500 Subject: [PATCH] Call |-setNeedsDisplay:| in the right places so that the line numbers paint properly --- Source/BSLineNumberRulerView.mm | 2 ++ Source/BSSourceView.mm | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Source/BSLineNumberRulerView.mm b/Source/BSLineNumberRulerView.mm index f0227e3..fe58b97 100644 --- a/Source/BSLineNumberRulerView.mm +++ b/Source/BSLineNumberRulerView.mm @@ -126,6 +126,8 @@ const CGFloat kRulerRightPadding = 2.5; NSAttributedString* lastElementString = [self attributedStringForLineNumber:lastElement]; NSSize boundingSize = [lastElementString size]; [self setRuleThickness:std::max(kDefaultWidth, boundingSize.width)]; + + [self setNeedsDisplay:YES]; } // Private ///////////////////////////////////////////////////////////////////// diff --git a/Source/BSSourceView.mm b/Source/BSSourceView.mm index 25e9a4c..a6f329b 100644 --- a/Source/BSSourceView.mm +++ b/Source/BSSourceView.mm @@ -178,6 +178,8 @@ unsigned lineStart, lineEnd; [[textView_ string] getLineStart:&lineStart end:NULL contentsEnd:&lineEnd forRange:NSMakeRange(rangeIndex - 1, 0)]; [textView_ scrollRangeToVisible:[[textView_ string] lineRangeForRange:NSMakeRange(lineStart, lineEnd - lineStart)]]; + + [scrollView_ setNeedsDisplay:YES]; } /** -- 2.43.5