~adnano/astronaut-devel

browser: Fix follow mode freeze on enter v1 APPLIED

Byron Torres: 1
 browser: Fix follow mode freeze on enter

 1 files changed, 6 insertions(+), 8 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~adnano/astronaut-devel/patches/26840/mbox | git am -3
Learn more about email & git

[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.

 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