summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2018-09-25 22:27:35 +0200
committerBram Moolenaar <Bram@vim.org>2018-09-25 22:27:35 +0200
commitee91c33570008aefd2d62b8f88b22db751acacbe (patch)
treecf6bd2e95fc3882caa34d9c6d924daa4b10d2096
parent8c63e0ec314ba07d54b881dc629fe19e6eda1fb8 (diff)
patch 8.1.0436: can get the text of inputsecret() with getcmdline()v8.1.0436
Problem: Can get the text of inputsecret() with getcmdline(). (Tommy Allen) Solution: Don't return the text.
-rw-r--r--src/ex_getln.c11
-rw-r--r--src/version.c2
2 files changed, 9 insertions, 4 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c
index f08ae90326..02c3e30095 100644
--- a/src/ex_getln.c
+++ b/src/ex_getln.c
@@ -1310,7 +1310,7 @@ getcmdline(
if (c != Ctrl_N && c != Ctrl_G && (c != 'e'
|| (ccline.cmdfirstc == '=' && KeyTyped)
#ifdef FEAT_EVAL
- || cmdline_star
+ || cmdline_star > 0
#endif
))
{
@@ -1805,8 +1805,8 @@ getcmdline(
new_cmdpos = -1;
if (c == '=')
{
- if (ccline.cmdfirstc == '=' // can't do this recursively
- || cmdline_star) // or when typing a password
+ if (ccline.cmdfirstc == '=' // can't do this recursively
+ || cmdline_star > 0) // or when typing a password
{
beep_flush();
c = ESC;
@@ -6506,8 +6506,11 @@ get_ccline_ptr(void)
char_u *
get_cmdline_str(void)
{
- struct cmdline_info *p = get_ccline_ptr();
+ 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);
diff --git a/src/version.c b/src/version.c
index d3b09ea4bf..7f21f2d809 100644
--- a/src/version.c
+++ b/src/version.c
@@ -795,6 +795,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 436,
+/**/
435,
/**/
434,