@@ -3307,6 +3307,7 @@ func (m *UI) openEditor(value string) tea.Cmd {
33073307 tmpPath := tmpfile.Name()
33083308 defer tmpfile.Close()
33093309 if _, err := tmpfile.WriteString(value); err != nil {
3310+ _ = os.Remove(tmpPath)
33103311 return util.ReportError(err)
33113312 }
33123313 cmd, err := editor.Command(
@@ -3318,6 +3319,7 @@ func (m *UI) openEditor(value string) tea.Cmd {
33183319 ),
33193320 )
33203321 if err != nil {
3322+ _ = os.Remove(tmpPath)
33213323 return util.ReportError(err)
33223324 }
33233325 return tea.ExecProcess(cmd, func(err error) tea.Msg {