Browse Source

Fixed forum-13600: CenterViewOn does not work for newly opened documents

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@2126 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Daniel Grunwald 19 years ago
parent
commit
11d027b2e9
  1. 9
      src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs

9
src/Main/Base/Project/Src/TextEditor/Gui/Editor/TextEditorDisplayBinding.cs

@ -442,9 +442,14 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor @@ -442,9 +442,14 @@ namespace ICSharpCode.SharpDevelop.DefaultEditor.Gui.Editor
#region IPositionable implementation
public void JumpTo(int line, int column)
{
textAreaControl.ActiveTextAreaControl.CenterViewOn(
line, (int)(0.3 * textAreaControl.ActiveTextAreaControl.TextArea.TextView.VisibleLineCount));
textAreaControl.ActiveTextAreaControl.JumpTo(line, column);
// we need to delay this call here because the text editor does not know its height if it was just created
WorkbenchSingleton.SafeThreadAsyncCall(
delegate {
textAreaControl.ActiveTextAreaControl.CenterViewOn(
line, (int)(0.3 * textAreaControl.ActiveTextAreaControl.TextArea.TextView.VisibleLineCount));
});
}
public int Line {

Loading…
Cancel
Save