Skip to content

Commit 1b6b89b

Browse files
authored
Merge pull request #3 from greycodee/dev
fix bug of send message when none character
2 parents 87b8eea + 72c5475 commit 1b6b89b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

main.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ func main() {
8686
textArea := tview.NewTextArea()
8787
textArea.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
8888
if event.Key() == tcell.KeyCtrlS {
89+
if textArea.GetText() == "" {
90+
return nil
91+
}
8992
sendMsgChan <- textArea.GetText()
9093
genFlagChan <- true
9194
textArea.SetText("", true)

0 commit comments

Comments
 (0)