From 742a6ac7e365f94ec8ab0c33c40ef0b419f23a0a Mon Sep 17 00:00:00 2001 From: Johan Walles Date: Sun, 19 Feb 2023 03:15:04 +0100 Subject: [PATCH] Allow 'q' to exit Go to Line I keep pressing 'q' to do this but it never worked... --- m/gotoLine.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/m/gotoLine.go b/m/gotoLine.go index 799a633..fa36906 100644 --- a/m/gotoLine.go +++ b/m/gotoLine.go @@ -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 {