summaryrefslogtreecommitdiff
path: root/tui.go
diff options
context:
space:
mode:
authorGrail Finder <wohilas@gmail.com>2025-03-22 07:29:25 +0300
committerGrail Finder <wohilas@gmail.com>2025-03-22 07:29:25 +0300
commit57fb00c49468f98803c6051d7af1e1ad85a294bf (patch)
treea323bbf079a2654ec3c8c01071b8ddb59df48d72 /tui.go
parentcb4a4b8cf7ee92dde37a3967d78f737802286f76 (diff)
Feat: cluedo card;
Diffstat (limited to 'tui.go')
-rw-r--r--tui.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/tui.go b/tui.go
index c65119a..853dccf 100644
--- a/tui.go
+++ b/tui.go
@@ -291,6 +291,9 @@ func init() {
SetPlaceholder("Replace msg...")
editArea.SetBorder(true).SetTitle("input")
editArea.SetInputCapture(func(event *tcell.EventKey) *tcell.EventKey {
+ defer func() {
+ editMode = false
+ }()
if event.Key() == tcell.KeyEscape && editMode {
defer colorText()
editedMsg := editArea.GetText()
@@ -299,14 +302,12 @@ func init() {
logger.Error("failed to send notification", "error", err)
}
pages.RemovePage(editMsgPage)
- editMode = false
return nil
}
chatBody.Messages[selectedIndex].Content = editedMsg
// change textarea
textView.SetText(chatToText(cfg.ShowSys))
pages.RemovePage(editMsgPage)
- editMode = false
return nil
}
return event