1
1
mirror of https://github.com/walles/moar.git synced 2024-10-26 13:00:40 +03:00

Keybinding: 'gg' now scrolls to line 1, like in less

This commit is contained in:
m3tav3rse 2023-09-17 21:55:34 +02:00
parent 0a2dfa38e2
commit 1b6b155bf3
No known key found for this signature in database
GPG Key ID: 8A8A4D6C83D1B954

View File

@ -52,6 +52,13 @@ func (p *Pager) onGotoLineRune(char rune) {
return
}
if char == 'g' {
p.scrollPosition = newScrollPosition("Pager scroll position")
p.handleScrolledUp()
p.mode = _Viewing
return
}
newGotoLineString := p.gotoLineString + string(char)
_, err := strconv.Atoi(newGotoLineString)
if err != nil {