Skip to content
Browse files

fixed regression in regex replace: $1 not properly translated

  • Loading branch information...
1 parent 63af0b8 commit e9aedd15fde34d5e1e20db1576309bf6133b84ab @siegfriedpammer siegfriedpammer committed Oct 26, 2011
View
2 src/AddIns/Misc/SearchAndReplace/Project/Engine/SearchManager.cs
@@ -182,7 +182,7 @@ SearchedFile SearchFile(FileName fileName)
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);
View
4 src/Main/Base/Project/Src/Editor/Search/SearchResultMatch.cs
@@ -100,11 +100,11 @@ public SimpleSearchResultMatch(FileName fileName, Location position, int offset,
}
}
- 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;

0 comments on commit e9aedd1

Please sign in to comment.
Something went wrong with that request. Please try again.