diff options
author | delthas <delthas@dille.cc> | 2021-07-12 19:54:52 +0200 |
---|---|---|
committer | Hubert Hirtz <hubert@hirtz.pm> | 2021-07-13 19:21:08 +0200 |
commit | c078fbbb029fd248756ea5d7726f9ae6090a4ee3 (patch) | |
tree | 22577d5ea43eb26d75cdbd065bfbdcd4088884fc /ui/ui.go | |
parent | Ratelimit +typing and send +typing=done once only (diff) |
Clear the input on CTRL+C instead of quitting
We have /QUIT for quitting. Most well-known IRC clients don't quit on
CTRL+C but they do on QUIT.
Clearing the editor input on CTRL+C is useful for shell-like behaviour
"abort current line, let me start my line again".
Diffstat (limited to 'ui/ui.go')
-rw-r--r-- | ui/ui.go | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -228,6 +228,10 @@ func (ui *UI) InputEnter() (content string) { return ui.e.Flush() } +func (ui *UI) InputClear() { + ui.e.Clear() +} + func (ui *UI) Resize() { w, h := ui.screen.Size() ui.e.Resize(w - 9 - ui.config.ChanColWidth - ui.config.NickColWidth) |