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
path: root/main/src
diff options
context:
space:
mode:
authorMike Krüger <mkrueger@xamarin.com>2015-02-11 22:32:15 +0300
committerMike Krüger <mkrueger@xamarin.com>2015-02-11 22:32:15 +0300
commit28060f7ced6b63c61ccb66e5e6e818fd95e1cb71 (patch)
tree7cad2f8dfe500a85ee142f74507345c0325aa958 /main/src
parentc9c33bb840e3f046ff71bfe0c9868fb1b923a495 (diff)
[TextEditor] Shift+scroll no longer scrolls beyond the maximal scroll
position. It was possible to scroll at least 1 page to the right using that feature.
Diffstat (limited to 'main/src')
-rw-r--r--main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs6
1 files changed, 2 insertions, 4 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 8872924319..55e9536cf0 100644
--- a/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs
+++ b/main/src/core/Mono.Texteditor/Mono.TextEditor/Gui/TextArea.cs
@@ -1647,12 +1647,10 @@ namespace Mono.TextEditor
if (!Platform.IsMac) {
if ((evnt.State & ModifierType.ShiftMask) == ModifierType.ShiftMask) {
if (evnt.Direction == ScrollDirection.Up)
- HAdjustment.Value += HAdjustment.StepIncrement * 3;
+ HAdjustment.Value = System.Math.Min (HAdjustment.Upper - HAdjustment.PageSize, HAdjustment.Value + HAdjustment.StepIncrement * 3);
else if (evnt.Direction == ScrollDirection.Down)
HAdjustment.Value -= HAdjustment.StepIncrement * 3;
-
- this.QueueDraw ();
-
+
return true;
}
}