From 2ae57c2021f5698ecb615ea4da62686cf8fce217 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Thu, 16 Dec 2010 16:36:11 +0100 Subject: [PATCH] removed orange search result marker, replaced by focus highlight --- .../Project/Gui/SearchResultNode.cs | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/src/AddIns/Misc/SearchAndReplace/Project/Gui/SearchResultNode.cs b/src/AddIns/Misc/SearchAndReplace/Project/Gui/SearchResultNode.cs index db859762f8..6c40152acf 100644 --- a/src/AddIns/Misc/SearchAndReplace/Project/Gui/SearchResultNode.cs +++ b/src/AddIns/Misc/SearchAndReplace/Project/Gui/SearchResultNode.cs @@ -115,30 +115,7 @@ namespace SearchAndReplace public override void ActivateItem() { - var location = anchor.Location; - ITextEditorProvider provider = FileService.JumpToFilePosition(anchor.FileName, location.Line, location.Column) as ITextEditorProvider; - if (provider != null) { - ITextMarkerService markerService = provider.TextEditor.GetService(typeof(ITextMarkerService)) as ITextMarkerService; - if (markerService != null) { - ITextMarker marker = null; - try { - marker = markerService.Create(provider.TextEditor.Document.PositionToOffset(location.Line, location.Column), result.Length); - } catch (ArgumentOutOfRangeException) { - // can happen if lineNumber/column is after the end of the document; or if - // result.Length is too long - } - if (marker != null) { - marker.BackgroundColor = Colors.Orange; - marker.Tag = this; - EventHandler remover = null; - remover = (sender, e) => { - marker.Delete(); - provider.TextEditor.Caret.PositionChanged -= remover; - }; - provider.TextEditor.Caret.PositionChanged += remover; - } - } - } + FileService.JumpToFilePosition(anchor.FileName, anchor.Location.Line, anchor.Location.Column); } } }