mirror of
https://github.com/walles/moar.git
synced 2024-11-22 20:49:34 +03:00
Allow 'q' to exit Go to Line
I keep pressing 'q' to do this but it never worked...
This commit is contained in:
parent
128250dbfe
commit
742a6ac7e3
@ -47,6 +47,11 @@ func (p *Pager) onGotoLineKey(key twin.KeyCode) {
|
||||
}
|
||||
|
||||
func (p *Pager) onGotoLineRune(char rune) {
|
||||
if char == 'q' {
|
||||
p.mode = _Viewing
|
||||
return
|
||||
}
|
||||
|
||||
newGotoLineString := p.gotoLineString + string(char)
|
||||
_, err := strconv.Atoi(newGotoLineString)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user