Clear message InputField text on Escape event key (#72)

This commit is contained in:
ayntgl 2021-10-15 22:34:27 +04:00 • committed by GitHub
parent 2400226ee1
commit 4b46d39d8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

1
ui.go
View file

@ -371,6 +371,7 @@ func onMessageInputFieldInputCapture(e *tcell.EventKey) *tcell.EventKey {
text = messageInputField.GetText() + text
messageInputField.SetText(text)
case tcell.KeyEscape:
messageInputField.SetText("")
messageInputField.SetTitle("")
selectedMessage = 0
}