Skip to content

Commit 5615be3

Browse files
committed
Merge branch 'rj/launch-editor-error-message'
Git writes a "waiting for your editor" message on an incomplete line after launching an editor, and then append another error message on the same line if the editor errors out. It now clears the "waiting for..." line before giving the error message. * rj/launch-editor-error-message: launch_editor: waiting message on error
2 parents 7f49008 + 48e1ca2 commit 5615be3

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

editor.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,15 @@ static int launch_specified_editor(const char *editor, const char *path,
104104
sigchain_pop(SIGQUIT);
105105
if (sig == SIGINT || sig == SIGQUIT)
106106
raise(sig);
107-
if (ret)
108-
return error("There was a problem with the editor '%s'.",
109-
editor);
110-
111107
if (print_waiting_for_editor && !is_terminal_dumb())
112108
/*
113109
* Erase the entire line to avoid wasting the
114110
* vertical space.
115111
*/
116112
term_clear_line();
113+
if (ret)
114+
return error("there was a problem with the editor '%s'",
115+
editor);
117116
}
118117

119118
if (!buffer)

0 commit comments

Comments
 (0)