summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0436
blob: 4f8fabb03bc10d1ecd82971f57aaa3352e48d410 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0436
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.0436
Problem:    Can get the text of inputsecret() with getcmdline(). (Tommy Allen)
Solution:   Don't return the text.
Files:	    src/ex_getln.c


*** ../vim-8.1.0435/src/ex_getln.c	2018-09-25 20:48:53.882887698 +0200
--- src/ex_getln.c	2018-09-25 22:24:49.489341379 +0200
***************
*** 1310,1316 ****
  	    if (c != Ctrl_N && c != Ctrl_G && (c != 'e'
  				    || (ccline.cmdfirstc == '=' && KeyTyped)
  #ifdef FEAT_EVAL
! 				    || cmdline_star
  #endif
  				    ))
  	    {
--- 1310,1316 ----
  	    if (c != Ctrl_N && c != Ctrl_G && (c != 'e'
  				    || (ccline.cmdfirstc == '=' && KeyTyped)
  #ifdef FEAT_EVAL
! 				    || cmdline_star > 0
  #endif
  				    ))
  	    {
***************
*** 1805,1812 ****
  		new_cmdpos = -1;
  		if (c == '=')
  		{
! 		    if (ccline.cmdfirstc == '=' // can't do this recursively
! 			    || cmdline_star)	// or when typing a password
  		    {
  			beep_flush();
  			c = ESC;
--- 1805,1812 ----
  		new_cmdpos = -1;
  		if (c == '=')
  		{
! 		    if (ccline.cmdfirstc == '='  // can't do this recursively
! 			    || cmdline_star > 0) // or when typing a password
  		    {
  			beep_flush();
  			c = ESC;
***************
*** 6506,6513 ****
      char_u *
  get_cmdline_str(void)
  {
!     struct cmdline_info *p = get_ccline_ptr();
  
      if (p == NULL)
  	return NULL;
      return vim_strnsave(p->cmdbuff, p->cmdlen);
--- 6506,6516 ----
      char_u *
  get_cmdline_str(void)
  {
!     struct cmdline_info *p;
  
+     if (cmdline_star > 0)
+ 	return NULL;
+     p = get_ccline_ptr();
      if (p == NULL)
  	return NULL;
      return vim_strnsave(p->cmdbuff, p->cmdlen);
*** ../vim-8.1.0435/src/version.c	2018-09-25 22:17:51.111962197 +0200
--- src/version.c	2018-09-25 22:27:15.498025693 +0200
***************
*** 796,797 ****
--- 796,799 ----
  {   /* Add new patch number below this line */
+ /**/
+     436,
  /**/

-- 
To be rich is not the end, but only a change of worries.

 /// 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    ///