From f1236d0fd36bddc2a0b139607c84b42e1e2c3fac Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Mon, 5 Nov 2007 15:44:27 +0100 Subject: [PATCH] Disable baseline change for underlined text. This fixes a display bug on Leopard where lines with underlined text were higher than lines without underlined text. --- src/MacVim/MMTextStorage.m | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/MacVim/MMTextStorage.m b/src/MacVim/MMTextStorage.m index 21bb518179..5cd014d463 100644 --- a/src/MacVim/MMTextStorage.m +++ b/src/MacVim/MMTextStorage.m @@ -229,25 +229,13 @@ else if (flags & DRAW_ITALIC) theFont = italicFont; - NSDictionary *attributes; - - if (flags & DRAW_UNDERC) { - // move the undercurl down a bit so it is visible - attributes = [NSDictionary dictionaryWithObjectsAndKeys: - theFont, NSFontAttributeName, - bg, NSBackgroundColorAttributeName, - fg, NSForegroundColorAttributeName, - sp, NSUnderlineColorAttributeName, - [NSNumber numberWithFloat:2],NSBaselineOffsetAttributeName, - nil]; - } else { - attributes = [NSDictionary dictionaryWithObjectsAndKeys: + NSDictionary *attributes = [NSDictionary dictionaryWithObjectsAndKeys: theFont, NSFontAttributeName, bg, NSBackgroundColorAttributeName, fg, NSForegroundColorAttributeName, sp, NSUnderlineColorAttributeName, nil]; - } + [attribString setAttributes:attributes range:range]; if (flags & DRAW_UNDERL) {