1
0
mirror of https://github.com/makew0rld/amfora.git synced 2024-11-03 02:37:23 -05:00

Paging up or down scrolls by 50% instead of 75%, to match less (#303)

This commit is contained in:
makeworld 2022-04-12 20:18:38 -04:00
parent ebf5e521d6
commit 00d90cbd7a
2 changed files with 3 additions and 2 deletions

View File

@ -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 <kbd>q</kbd> was removed in favor of <kbd>Shift-q</kbd> (#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)

View File

@ -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
}