From 00d90cbd7a6ecf7347d4812b1179bd2b78c78b85 Mon Sep 17 00:00:00 2001 From: makeworld Date: Tue, 12 Apr 2022 20:18:38 -0400 Subject: [PATCH] Paging up or down scrolls by 50% instead of 75%, to match `less` (#303) --- CHANGELOG.md | 1 + display/tab.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c8c2a40..5e745a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `max_width` defaults to 80 columns instead of 100 (#233) - Tabs have the domain of the current page instead of numbers (#202) - Closing Amfora with q was removed in favor of Shift-q (#243) +- Paging up or down scrolls by 50% instead of 75%, to match `less` (#303) ### Fixed - Modal can't be closed when opening non-gemini text URLs from the commandline (#283, #284) diff --git a/display/tab.go b/display/tab.go index 6c1cfb2..9f9f45d 100644 --- a/display/tab.go +++ b/display/tab.go @@ -352,7 +352,7 @@ func (t *tab) addToHistory(u string) { // pageUp scrolls up 75% of the height of the terminal, like Bombadillo. func (t *tab) pageUp() { - t.page.Row -= (termH / 4) * 3 + t.page.Row -= termH / 2 if t.page.Row < 0 { t.page.Row = 0 } @@ -363,7 +363,7 @@ func (t *tab) pageUp() { func (t *tab) pageDown() { height, _ := t.view.GetBufferSize() - t.page.Row += (termH / 4) * 3 + t.page.Row += termH / 2 if t.page.Row > height { t.page.Row = height }