Skip to content

Commit ee91c33

Browse files
committed
patch 8.1.0436: can get the text of inputsecret() with getcmdline()
Problem: Can get the text of inputsecret() with getcmdline(). (Tommy Allen) Solution: Don't return the text.
1 parent 8c63e0e commit ee91c33

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/ex_getln.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ getcmdline(
13101310
if (c != Ctrl_N && c != Ctrl_G && (c != 'e'
13111311
|| (ccline.cmdfirstc == '=' && KeyTyped)
13121312
#ifdef FEAT_EVAL
1313-
|| cmdline_star
1313+
|| cmdline_star > 0
13141314
#endif
13151315
))
13161316
{
@@ -1805,8 +1805,8 @@ getcmdline(
18051805
new_cmdpos = -1;
18061806
if (c == '=')
18071807
{
1808-
if (ccline.cmdfirstc == '=' // can't do this recursively
1809-
|| cmdline_star) // or when typing a password
1808+
if (ccline.cmdfirstc == '=' // can't do this recursively
1809+
|| cmdline_star > 0) // or when typing a password
18101810
{
18111811
beep_flush();
18121812
c = ESC;
@@ -6506,8 +6506,11 @@ get_ccline_ptr(void)
65066506
char_u *
65076507
get_cmdline_str(void)
65086508
{
6509-
struct cmdline_info *p = get_ccline_ptr();
6509+
struct cmdline_info *p;
65106510

6511+
if (cmdline_star > 0)
6512+
return NULL;
6513+
p = get_ccline_ptr();
65116514
if (p == NULL)
65126515
return NULL;
65136516
return vim_strnsave(p->cmdbuff, p->cmdlen);

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,8 @@ static char *(features[]) =
794794

795795
static int included_patches[] =
796796
{ /* Add new patch number below this line */
797+
/**/
798+
436,
797799
/**/
798800
435,
799801
/**/

0 commit comments

Comments
 (0)