diff options
author | Mike Krüger <mkrueger@xamarin.com> | 2016-04-18 14:20:07 +0300 |
---|---|---|
committer | Vsevolod Kukol <sevoku@xamarin.com> | 2016-04-18 14:38:58 +0300 |
commit | 760623d2dc4bd70afcd6a5deeaec7d3d4521a174 (patch) | |
tree | e130281fdaef05317a12dc8564d1316075fe30e8 /main/src/core/Mono.Texteditor | |
parent | ef2bfc35a63b03e6b0cdcb032e431f275c089f9d (diff) |
[TextEditor] Added command for focussing & centering.
Centering the caret is now at 33% no longer at 50%
(cherry picked from commit 93b5af7c4c2b940f0f071eb1641131a8035ba125)
Diffstat (limited to 'main/src/core/Mono.Texteditor')
-rw-r--r-- | main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs index b13c87e7ef..ef32ab7282 100644 --- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs +++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs @@ -1543,7 +1543,7 @@ namespace Mono.TextEditor // int yMargin = 1 * this.LineHeight; double caretPosition = editor.TextArea.LineToY (p.Line); - caretPosition -= editor.TextArea.textEditorData.VAdjustment.PageSize / 2; + caretPosition -= editor.TextArea.textEditorData.VAdjustment.PageSize / 3; // Make sure the caret position is inside the bounds. This avoids an unnecessary bump of the scrollview. // The adjustment does this check, but does it after assigning the value, so the value may be out of bounds for a while. |