tui: remove temporary edit file

This commit is contained in:
Matt Low 2024-03-29 22:26:28 +00:00
parent 9cd28d28d7
commit 2e3779ad32

View File

@ -32,6 +32,7 @@ func openTempfileEditor(pattern string, content string, placeholder string) tea.
if err != nil {
return msgError(err)
}
os.Remove(msgFile.Name())
fileContents := string(bytes)
if strings.HasPrefix(fileContents, placeholder) {
fileContents = fileContents[len(placeholder):]