Browse Source

fix bug in InsertWithCursor: should not scroll to top after start of InsertWithCursor-mode

pull/374/merge
Siegfried Pammer 12 years ago
parent
commit
f69ce55bf0
  1. 1
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/EditorScript.cs
  2. 3
      src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/InsertionCursorLayer.cs

1
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/EditorScript.cs

@ -152,6 +152,7 @@ namespace CSharpBinding.Refactoring @@ -152,6 +152,7 @@ namespace CSharpBinding.Refactoring
if (doc != null) {
doc.UndoStack.Push(op);
}
layer.ScrollToInsertionPoint();
layer.Exited += delegate(object s, InsertionCursorEventArgs args) {
doc.UndoStack.StartContinuedUndoGroup();
try {

3
src/AddIns/BackendBindings/CSharpBinding/Project/Src/Refactoring/InsertionCursorLayer.cs

@ -65,7 +65,6 @@ namespace CSharpBinding.Refactoring @@ -65,7 +65,6 @@ namespace CSharpBinding.Refactoring
this.editor.TextView.InsertLayer(this, KnownLayer.Text, LayerInsertionPosition.Above);
this.editor.TextView.ScrollOffsetChanged += TextViewScrollOffsetChanged;
AddGroupBox();
ScrollToInsertionPoint();
}
static readonly Pen markerPen = new Pen(Brushes.Blue, 2);
@ -246,7 +245,7 @@ namespace CSharpBinding.Refactoring @@ -246,7 +245,7 @@ namespace CSharpBinding.Refactoring
FireExited(true);
}
void ScrollToInsertionPoint()
internal void ScrollToInsertionPoint()
{
var location = insertionPoints[CurrentInsertionPoint].Location;
editor.GetService<TextEditor>().ScrollTo(location.Line, location.Column);

Loading…
Cancel
Save