~adnano/astronaut

c854ee4e43612b820aca80b1d0770f2383ce7ac4 — Byron Torres 5 months ago c36219a
browser: Fix follow mode freeze on enter

astronaut would freeze indefinitely when the user would press Enter in
hint/follow mode.
1 files changed, 6 insertions(+), 8 deletions(-)

M browser.go
M browser.go => browser.go +6 -8
@@ 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()