From e9aedd15fde34d5e1e20db1576309bf6133b84ab Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Wed, 26 Oct 2011 13:37:06 +0200 Subject: [PATCH] fixed regression in regex replace: $1 not properly translated --- .../Misc/SearchAndReplace/Project/Engine/SearchManager.cs | 2 +- src/Main/Base/Project/Src/Editor/Search/SearchResultMatch.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/AddIns/Misc/SearchAndReplace/Project/Engine/SearchManager.cs b/src/AddIns/Misc/SearchAndReplace/Project/Engine/SearchManager.cs index 44d866e189..77663f0490 100644 --- a/src/AddIns/Misc/SearchAndReplace/Project/Engine/SearchManager.cs +++ b/src/AddIns/Misc/SearchAndReplace/Project/Engine/SearchManager.cs @@ -182,7 +182,7 @@ namespace SearchAndReplace var start = document.GetLocation(result.Offset).ToLocation(); var end = document.GetLocation(result.Offset + result.Length).ToLocation(); var builder = SearchResultsPad.CreateInlineBuilder(start, end, document, highlighter); - results.Add(new SearchResultMatch(fileName, start, end, result.Offset, result.Length, builder)); + results.Add(new AvalonEditSearchResultMatch(fileName, start, end, result.Offset, result.Length, builder, result)); } if (results.Count > 0) return new SearchedFile(fileName, results); diff --git a/src/Main/Base/Project/Src/Editor/Search/SearchResultMatch.cs b/src/Main/Base/Project/Src/Editor/Search/SearchResultMatch.cs index be8783edbd..4fade66fb5 100644 --- a/src/Main/Base/Project/Src/Editor/Search/SearchResultMatch.cs +++ b/src/Main/Base/Project/Src/Editor/Search/SearchResultMatch.cs @@ -100,11 +100,11 @@ namespace ICSharpCode.SharpDevelop.Editor.Search } } - public class RegexResultMatch : SearchResultMatch + public class AvalonEditSearchResultMatch : SearchResultMatch { ICSharpCode.AvalonEdit.Search.ISearchResult match; - public RegexResultMatch(FileName fileName, Location startLocation, Location endLocation, int offset, int length, HighlightedInlineBuilder builder, ICSharpCode.AvalonEdit.Search.ISearchResult match) + public AvalonEditSearchResultMatch(FileName fileName, Location startLocation, Location endLocation, int offset, int length, HighlightedInlineBuilder builder, ICSharpCode.AvalonEdit.Search.ISearchResult match) : base(fileName, startLocation, endLocation, offset, length, builder) { this.match = match;