[PATCH] browser: Fix follow mode freeze on enter
Export this patch
astronaut would freeze indefinitely when the user would press Enter in
hint/follow mode.
---
Not sure if this is a correct solution, but it seems to work.
The input handling design probably needs to be overhauled someday, but
this will work for now.
browser.go | 14 ++++++ --------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git a/browser.go b/browser.go
index e933dbc..14ab72a 100644
--- a/browser.go
@@ -320,14 +320,12 @@ func (b *Browser) Event(event tcell.Event) {
switch event := event.(type) {
case *ui.EventTextInput:
- if event.NoInput() {
- b.mode = ModeNormal
- b.hint = ""
- b.hints = nil
- b.hintlen = 0
- b.view.Invalidate()
- return
- }
+ b.mode = ModeNormal
+ b.hint = ""
+ b.hints = nil
+ b.hintlen = 0
+ b.view.Invalidate()
+ return
case *ui.EventTextEdit:
s := event.Text()
--
2.34.0
Thanks!
To git@git.sr.ht:~adnano/astronaut
c36219a..c854ee4 master -> master