diff --git a/Modules/Editors/ProjectCenter/PCEditor.h b/Modules/Editors/ProjectCenter/PCEditor.h index 637283d..1917a8e 100644 --- a/Modules/Editors/ProjectCenter/PCEditor.h +++ b/Modules/Editors/ProjectCenter/PCEditor.h @@ -78,11 +78,6 @@ // location of the highlighted delimiter characters // NSNotFound means not set NSUInteger highlighted_chars[2]; - - // the stored font attributes of the highlit character, so - // that they can be restored later on when the character is un-highlit - // A pair is assumed to have the same attributes - NSColor *previousFont; // This is used to protect that -textViewDidChangeSelection: invocations // don't do anything when the text view changing, because this causes diff --git a/Modules/Editors/ProjectCenter/PCEditor.m b/Modules/Editors/ProjectCenter/PCEditor.m index 55330e0..c5b4213 100644 --- a/Modules/Editors/ProjectCenter/PCEditor.m +++ b/Modules/Editors/ProjectCenter/PCEditor.m @@ -219,8 +219,6 @@ ASSIGN(backgroundColor, [NSColor whiteColor]); ASSIGN(readOnlyColor, [NSColor lightGrayColor]); - previousFont = nil; - highlighted_chars[0] = NSNotFound; highlighted_chars[1] = NSNotFound; @@ -1376,18 +1374,6 @@ NSUInteger FindDelimiterInString(NSString * string, NSRange r = NSMakeRange(highlighted_chars[i], 1); - // restore the character's color and font attributes - if (previousFont != nil) - { - [textStorage addAttribute:NSFontAttributeName - value:previousFont - range:r]; - } - else - { - [textStorage removeAttribute:NSFontAttributeName range:r]; - } - [textStorage addAttribute:NSBackgroundColorAttributeName value:textBackgroundColor range:r]; @@ -1414,14 +1400,6 @@ NSUInteger FindDelimiterInString(NSString * string, NSAssert(textStorage, @"textstorage can't be nil"); - // store the previous character's attributes - ASSIGN(previousFont, [textStorage attribute:NSFontAttributeName - atIndex:r.location - effectiveRange:NULL]); - - [textStorage addAttribute:NSFontAttributeName - value:highlightFont - range:r]; [textStorage addAttribute:NSBackgroundColorAttributeName value:highlightColor range:r];