From 83c4f299d4caad2a3fd03151c76518869f92b21f Mon Sep 17 00:00:00 2001 From: Kaoru Yoshida Date: Wed, 2 Jul 2008 21:59:37 +0200 Subject: [PATCH] Fix display issue with marked text at the edge of a window --- src/MacVim/MMTextView.m | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/MacVim/MMTextView.m b/src/MacVim/MMTextView.m index 41075dee5c..0f26696c82 100644 --- a/src/MacVim/MMTextView.m +++ b/src/MacVim/MMTextView.m @@ -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: