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:
parent
0a2dfa38e2
commit
1b6b155bf3
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user