From 267be7af7bcc123ffcc3657907a7b2504ab7e455 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 41075dee..0f26696c 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: -- 2.11.4.GIT