patch 9.1.1281: extra newline output when editing stdin

Commit: 
https://github.com/vim/vim/commit/221927b2bfbd7de1623770bee4f6740356bb6c81
Author: Abhijit Barik <abhijit.ba...@ivanti.com>
Date:   Sun Apr 6 16:12:06 2025 +0200

    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 <lemon...@users.noreply.github.com>
    Signed-off-by: Abhijit Barik <abhijit.ba...@ivanti.com>
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/src/main.c b/src/main.c
index f603a52a5..776694628 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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
 
diff --git a/src/testdir/test_startup.vim b/src/testdir/test_startup.vim
index 8052aa883..03876749f 100644
--- a/src/testdir/test_startup.vim
+++ b/src/testdir/test_startup.vim
@@ -781,6 +781,68 @@ func Test_progpath()
   call assert_match('vim

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/E1u1QmG-00460Q-IA%40256bit.org.

Raspunde prin e-mail lui