diff options
author | Hubert Hirtz <hubert@hirtz.pm> | 2021-07-13 21:42:21 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-07-13 21:42:21 +0200 |
commit | 7c26eb5acdcc113a0479147b408770be8f1e035c (patch) | |
tree | 9b7ad33124cad4475659ac93a28c3010c2676243 | |
parent | Switch to the buffer of a new user-requested channel join (diff) |
Always update prompt
-rw-r--r-- | app.go | 11 |
1 files changed, 1 insertions, 10 deletions
@@ -115,6 +115,7 @@ func (app *App) eventLoop() { app.handleEvents(evs) if !app.pasting { app.setStatus() + app.updatePrompt() app.win.Draw() } } @@ -311,7 +312,6 @@ func (app *App) handleMouseEvent(ev *tcell.EventMouse) { if ev.Buttons() == 0 { if y == app.win.ClickedBuffer() && x < app.cfg.ChanColWidth { app.win.GoToBufferNo(y) - app.updatePrompt() } app.win.ClickBuffer(-1) } @@ -336,7 +336,6 @@ func (app *App) handleKeyEvent(ev *tcell.EventKey) { case tcell.KeyRight: if ev.Modifiers() == tcell.ModAlt { app.win.NextBuffer() - app.updatePrompt() } else if ev.Modifiers() == tcell.ModCtrl { app.win.InputRightWord() } else { @@ -345,7 +344,6 @@ func (app *App) handleKeyEvent(ev *tcell.EventKey) { case tcell.KeyLeft: if ev.Modifiers() == tcell.ModAlt { app.win.PreviousBuffer() - app.updatePrompt() } else if ev.Modifiers() == tcell.ModCtrl { app.win.InputLeftWord() } else { @@ -357,14 +355,12 @@ func (app *App) handleKeyEvent(ev *tcell.EventKey) { } else { app.win.InputUp() } - app.updatePrompt() case tcell.KeyDown: if ev.Modifiers() == tcell.ModAlt { app.win.NextBuffer() } else { app.win.InputDown() } - app.updatePrompt() case tcell.KeyHome: if ev.Modifiers() == tcell.ModAlt { app.win.GoToBufferNo(0) @@ -382,19 +378,16 @@ func (app *App) handleKeyEvent(ev *tcell.EventKey) { ok := app.win.InputBackspace() if ok { app.typing() - app.updatePrompt() } case tcell.KeyDelete: ok := app.win.InputDelete() if ok { app.typing() - app.updatePrompt() } case tcell.KeyCtrlW: ok := app.win.InputDeleteWord() if ok { app.typing() - app.updatePrompt() } case tcell.KeyTab: ok := app.win.InputAutoComplete(1) @@ -418,11 +411,9 @@ func (app *App) handleKeyEvent(ev *tcell.EventKey) { Body: ui.PlainSprintf("%q: %s", input, err), }) } - app.updatePrompt() case tcell.KeyRune: app.win.InputRune(ev.Rune()) app.typing() - app.updatePrompt() default: return } |