Skip to content

Commit

Permalink
Fixed bug where Classifier wouldn't detect that the new underline span
Browse files Browse the repository at this point in the history
it was being asked to highlight was identical to the old.  This caused
it to send out spurious (and fairly constant) layouts.  In addition
to the perf implications, this caused two annoying bugs:

1) You couldn't ctrl-click on an underlined token when there was a marker of
   some sort over the text (breakpoint, highlight-matching-identifier, etc.)
2) If you were trying to activate a smart tag with ctrl+. the smart tag would
   open and then immediately close.
  • Loading branch information
Noah Richards committed Jan 12, 2010
1 parent f7fbdb3 commit 96f6e92
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Classifier.cs
Expand Up @@ -98,6 +98,9 @@ public void SetUnderlineSpan(SnapshotSpan? span)
if (!oldSpan.HasValue && !_underlineSpan.HasValue)
return;

else if (oldSpan.HasValue && _underlineSpan.HasValue && oldSpan == _underlineSpan)
return;

if (!_underlineSpan.HasValue)
{
this.SendEvent(oldSpan.Value);
Expand Down
2 changes: 1 addition & 1 deletion GoToDefMouseHandler.cs
Expand Up @@ -287,4 +287,4 @@ bool DispatchGoToDef()

#endregion
}
}
}

0 comments on commit 96f6e92

Please sign in to comment.