aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2024-04-23 11:52:39 -0700
committerJunio C Hamano <gitster@pobox.com>2024-04-23 11:52:39 -0700
commit5615be39bc348d3e78018341d20737cc4fb0779f (patch)
treecc46bfc1d6dbe44943e2da6c0024c01e7ba66508
parent7f49008602b79c3f5767051901968b1b4b8a1ddf (diff)
parent48e1ca27b1fed9d71779bf93d524b4aed9d66da3 (diff)
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
-rw-r--r--editor.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/editor.c b/editor.c
index b67b802ddf..d1ba2d7c34 100644
--- a/editor.c
+++ b/editor.c
@@ -104,16 +104,15 @@ static int launch_specified_editor(const char *editor, const char *path,
sigchain_pop(SIGQUIT);
if (sig == SIGINT || sig == SIGQUIT)
raise(sig);
- if (ret)
- return error("There was a problem with the editor '%s'.",
- editor);
-
if (print_waiting_for_editor && !is_terminal_dumb())
/*
* Erase the entire line to avoid wasting the
* vertical space.
*/
term_clear_line();
+ if (ret)
+ return error("there was a problem with the editor '%s'",
+ editor);
}
if (!buffer)