mirror of
https://github.com/vim/vim.git
synced 2025-09-25 03:54:15 -04:00
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.
This commit is contained in:
@@ -1310,7 +1310,7 @@ getcmdline(
|
|||||||
if (c != Ctrl_N && c != Ctrl_G && (c != 'e'
|
if (c != Ctrl_N && c != Ctrl_G && (c != 'e'
|
||||||
|| (ccline.cmdfirstc == '=' && KeyTyped)
|
|| (ccline.cmdfirstc == '=' && KeyTyped)
|
||||||
#ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
|| cmdline_star
|
|| cmdline_star > 0
|
||||||
#endif
|
#endif
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
@@ -1805,8 +1805,8 @@ getcmdline(
|
|||||||
new_cmdpos = -1;
|
new_cmdpos = -1;
|
||||||
if (c == '=')
|
if (c == '=')
|
||||||
{
|
{
|
||||||
if (ccline.cmdfirstc == '=' // can't do this recursively
|
if (ccline.cmdfirstc == '=' // can't do this recursively
|
||||||
|| cmdline_star) // or when typing a password
|
|| cmdline_star > 0) // or when typing a password
|
||||||
{
|
{
|
||||||
beep_flush();
|
beep_flush();
|
||||||
c = ESC;
|
c = ESC;
|
||||||
@@ -6506,8 +6506,11 @@ get_ccline_ptr(void)
|
|||||||
char_u *
|
char_u *
|
||||||
get_cmdline_str(void)
|
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)
|
if (p == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
return vim_strnsave(p->cmdbuff, p->cmdlen);
|
return vim_strnsave(p->cmdbuff, p->cmdlen);
|
||||||
|
@@ -794,6 +794,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
436,
|
||||||
/**/
|
/**/
|
||||||
435,
|
435,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user