0
0
mirror of https://github.com/vim/vim.git synced 2025-10-28 09:27:14 -04:00

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>
This commit is contained in:
Abhijit Barik
2025-04-06 16:12:06 +02:00
committed by Christian Brabandt
parent ba73766788
commit 221927b2bf
3 changed files with 65 additions and 1 deletions

View File

@@ -660,7 +660,7 @@ vim_main2(void)
#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