Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffView.cs')
-rw-r--r--main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffView.cs9
1 files changed, 4 insertions, 5 deletions
diff --git a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffView.cs b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffView.cs
index 4d3521553b..8920fd588a 100644
--- a/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffView.cs
+++ b/main/src/addins/VersionControl/MonoDevelop.VersionControl/MonoDevelop.VersionControl.Views/DiffView.cs
@@ -83,7 +83,7 @@ namespace MonoDevelop.VersionControl.Views
#region IAttachableViewContent implementation
- public int GetLineInCenter (Mono.TextEditor.TextEditor editor)
+ public int GetLineInCenter (Mono.TextEditor.MonoTextEditor editor)
{
double midY = editor.VAdjustment.Value + editor.Allocation.Height / 2;
return editor.YToLine (midY);
@@ -93,11 +93,10 @@ namespace MonoDevelop.VersionControl.Views
{
info.Start ();
ComparisonWidget.UpdateLocalText ();
- var buffer = info.Document.GetContent<ITextBuffer> ();
+ var buffer = info.Document.GetContent<MonoDevelop.Ide.Editor.TextEditor> ();
if (buffer != null) {
- int line, col;
- buffer.GetLineColumnFromPosition (buffer.CursorPosition, out line, out col);
- ComparisonWidget.OriginalEditor.SetCaretTo (line, col);
+ var loc = buffer.CaretLocation;
+ ComparisonWidget.OriginalEditor.SetCaretTo (loc.Line, loc.Column);
}
if (ComparisonWidget.Allocation.Height == 1 && ComparisonWidget.Allocation.Width == 1) {