From 37187c8d4fb2f9ca627ff8d18c4d1be75e985f29 Mon Sep 17 00:00:00 2001 From: BDisp Date: Sat, 13 Jun 2020 15:42:10 +0100 Subject: [PATCH 1/2] Fixes https://github.com/migueldeicaza/gui.cs/pull/681#issuecomment-643625748 ScrollDown. --- Terminal.Gui/Views/ScrollView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.Gui/Views/ScrollView.cs b/Terminal.Gui/Views/ScrollView.cs index 7bfdbd5fb..af77283d0 100644 --- a/Terminal.Gui/Views/ScrollView.cs +++ b/Terminal.Gui/Views/ScrollView.cs @@ -556,7 +556,7 @@ namespace Terminal.Gui { public bool ScrollDown (int lines) { var ny = Math.Max (-contentSize.Height, contentOffset.Y - lines); - if (Math.Abs (ny) == contentSize.Height) + if (Math.Abs (ny) == contentSize.Height - 1) return false; ContentOffset = new Point (contentOffset.X, ny); return true; From 9ca531cdbc1419895a36a162f0aa1207def483fc Mon Sep 17 00:00:00 2001 From: BDisp Date: Sun, 14 Jun 2020 01:53:42 +0100 Subject: [PATCH 2/2] This is also working too. --- Terminal.Gui/Views/ScrollView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Terminal.Gui/Views/ScrollView.cs b/Terminal.Gui/Views/ScrollView.cs index af77283d0..9e7bc1665 100644 --- a/Terminal.Gui/Views/ScrollView.cs +++ b/Terminal.Gui/Views/ScrollView.cs @@ -556,7 +556,7 @@ namespace Terminal.Gui { public bool ScrollDown (int lines) { var ny = Math.Max (-contentSize.Height, contentOffset.Y - lines); - if (Math.Abs (ny) == contentSize.Height - 1) + if (ny == contentOffset.Y) return false; ContentOffset = new Point (contentOffset.X, ny); return true;