diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2012-03-31 02:50:43 +0400 |
---|---|---|
committer | Mike Krüger <mkrueger@xamarin.com> | 2012-03-31 02:50:43 +0400 |
commit | aa219d23562c3acea8880d5906353c117dcce572 (patch) | |
tree | e6bb9c8f023b7f40073c9d3898e3c519e5aa9fd6 /main/src/addins/VersionControl | |
parent | 1d80899770287cc6eea7e4da1706d961654863bf (diff) |
[VersionControl] Track API changes.
Diffstat (limited to 'main/src/addins/VersionControl')
-rw-r--r-- | main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/MergeWidget.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/MergeWidget.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/MergeWidget.cs index cf86a68650..8bbc9fa75b 100644 --- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/MergeWidget.cs +++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/MergeWidget.cs @@ -121,15 +121,17 @@ namespace MonoDevelop.VersionControl.Views // todo: move to version control backend IEnumerable<Conflict> Conflicts (Mono.TextEditor.TextDocument doc) { - foreach (int mergeStart in doc.SearchForward ("<<<<<<<", 0)) { + int mergeStart = 0; + while ((mergeStart = doc.IndexOf ("<<<<<<<", mergeStart, doc.TextLength, StringComparison.Ordinal)) >= 0) { LineSegment start = doc.GetLineByOffset (mergeStart); if (start.Offset != mergeStart) continue; - int dividerOffset = doc.SearchForward ("=======", mergeStart).First (); + int dividerOffset = doc.IndexOf ("=======", mergeStart, doc.TextLength, StringComparison.Ordinal); LineSegment divider = doc.GetLineByOffset (dividerOffset); - int endOffset = doc.SearchForward (">>>>>>>", dividerOffset).First (); + int endOffset = doc.IndexOf (">>>>>>>", dividerOffset, doc.TextLength, StringComparison.Ordinal); LineSegment end = doc.GetLineByOffset (endOffset); + mergeStart = dividerOffset; yield return new Conflict (new TextSegment (start.EndOffset, divider.Offset - start.EndOffset), new TextSegment (divider.EndOffset, end.Offset - divider.EndOffset), |