mirror of
https://github.com/walles/moar.git
synced 2024-11-30 02:34:13 +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) {
|
func (p *Pager) onGotoLineRune(char rune) {
|
||||||
|
if char == 'q' {
|
||||||
|
p.mode = _Viewing
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
newGotoLineString := p.gotoLineString + string(char)
|
newGotoLineString := p.gotoLineString + string(char)
|
||||||
_, err := strconv.Atoi(newGotoLineString)
|
_, err := strconv.Atoi(newGotoLineString)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user