patch 9.1.1281: extra newline output when editing stdin
Problem: extra newline output when editing stdin
Solution: remove outputting when reading from stdin in non-terminal mode
(Abhijit Barik)
fixes: #16856
closes: #17047
Co-authored-by: LemonBoy <LemonBoy@users.noreply.github.com>
Signed-off-by: Abhijit Barik <Abhijit.Barik@ivanti.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/main.c b/src/main.c
index f603a52..7766946 100644
--- a/src/main.c
+++ b/src/main.c
@@ -660,7 +660,7 @@
#if defined(UNIX) || defined(VMS)
// When switching screens and something caused a message from a vimrc
// script, need to output an extra newline on exit.
- if ((did_emsg || msg_didout) && *T_TI != NUL)
+ if ((did_emsg || msg_didout) && *T_TI != NUL && params.edit_type != EDIT_STDIN)
newline_on_exit = TRUE;
#endif