@@ -6,7 +6,6 @@ import (
6 "math/rand"
6 "math/rand"
10 "path/filepath"
9 "path/filepath"
@@ -112,11 +111,8 @@ func (m *editorCmp) openEditor(value string) tea.Cmd {
112 if _, err := tmpfile.WriteString(value); err != nil {
111 if _, err := tmpfile.WriteString(value); err != nil {
113 return util.ReportError(err)
112 return util.ReportError(err)
115− c := exec.CommandContext(context.TODO(), editor, tmpfile.Name())
114+ cmdStr := editor + " " + tmpfile.Name()
117− c.Stdout = os.Stdout
118− c.Stderr = os.Stderr
119− return tea.ExecProcess(c, func(err error) tea.Msg {
115+ return util.ExecShell(context.TODO(), cmdStr, func(err error) tea.Msg {
120 if err != nil {
116 if err != nil {
121 return util.ReportError(err)
117 return util.ReportError(err)