Fix display issue with marked text at the edge of a window

This commit is contained in:
Kaoru Yoshida
2008-07-02 21:59:37 +02:00
committed by Bjorn Winckler
parent 26335ef7bd
commit 83c4f299d4
+5 -1
View File
@@ -492,7 +492,11 @@ enum {
// Calculate how many wide-font characters can be inserted at
// a first line, and draw those characters.
int cols = ([ts actualColumns] - insertionPointColumn) / 2;
int cols = ([ts actualColumns] - insertionPointColumn);
NSFont *theFont = [markedTextAttributes
valueForKey:NSFontAttributeName];
if (theFont == [ts fontWide])
cols = cols / 2;
int done = 0;
int lend = cols > len ? len : cols;
NSAttributedString *aString = [markedText attributedSubstringFromRange: