Fix issues when swapping between message input and editor (#363)

This commit is contained in:
cyberme0w 2024-03-12 09:19:38 +00:00 • committed by GitHub
parent 23cb3a146a
commit 198cc8f1d6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -120,6 +120,7 @@ func (mi *MessageInput) launchEditorAction() {
log.Println(err)
return
}
f.WriteString(mi.GetText())
f.Close()
defer os.Remove(f.Name())
@ -143,5 +144,5 @@ func (mi *MessageInput) launchEditorAction() {
return
}
mi.SetText(string(msg), true)
mi.SetText(strings.TrimSpace(string(msg)), true)
}