Patch 8.1.0969
Problem:    Message written during startup is truncated.
Solution:   Restore message after truncating. (closes 3969)
Files:      src/message.c, src/testdir/test_startup.vim


*** ../vim-8.1.0968/src/message.c       2019-02-19 21:34:01.987747438 +0100
--- src/message.c       2019-02-22 13:32:52.707946070 +0100
***************
*** 2627,2638 ****
--- 2627,2645 ----
  
      if (*p != NUL && !(silent_mode && p_verbose == 0))
      {
+       int c = -1;
+ 
        if (maxlen > 0 && STRLEN(p) > (size_t)maxlen)
+       {
+           c = p[maxlen];
            p[maxlen] = 0;
+       }
        if (info_message)
            mch_msg((char *)p);
        else
            mch_errmsg((char *)p);
+       if (c != -1)
+           p[maxlen] = c;
      }
  
      msg_didout = TRUE;            // assume that line is not empty
*** ../vim-8.1.0968/src/testdir/test_startup.vim        2018-12-28 
18:32:52.464575534 +0100
--- src/testdir/test_startup.vim        2019-02-22 13:34:18.979403981 +0100
***************
*** 537,539 ****
--- 537,549 ----
    endif
    call delete('Xtestout')
  endfunc
+ 
+ func Test_issue_3969()
+   if has('gui_running')
+     " Can't catch the output of gvim.
+     return
+   endif
+   " Check that message is not truncated.
+   let out = system(GetVimCommand() . ' -es -X -V1 -c "echon ''hello''" -cq')
+   call assert_equal('hello', out)
+ endfunc
*** ../vim-8.1.0968/src/version.c       2019-02-21 22:28:48.247020124 +0100
--- src/version.c       2019-02-22 13:39:18.929527227 +0100
***************
*** 781,782 ****
--- 781,784 ----
  {   /* Add new patch number below this line */
+ /**/
+     969,
  /**/

-- 
hundred-and-one symptoms of being an internet addict:
10. And even your night dreams are in HTML.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui