Sfoglia il codice sorgente

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

ayntgl 4 anni fa
parent
commit
4b46d39d8e
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      ui.go

+ 1 - 0
ui.go

@@ -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
 	}