summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0969
blob: a114decde5b7e87a8dbc335d67a1909c8b7f6d0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0969
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

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 -- Bram@Moolenaar.net -- 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    ///