tui: remove temporary edit file

This commit is contained in:
Matt Low 2024-03-29 22:26:28 +00:00
parent 9cd28d28d7
commit 2e3779ad32
1 changed files with 1 additions and 0 deletions

View File

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