vim-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.
ee91c33570
This commit is contained in:
Jan Edmund Lazo 2018-09-25 23:10:26 -04:00
parent 28ac4a99f2
commit c6350e4150

View File

@ -797,7 +797,7 @@ static int command_line_execute(VimState *state, int key)
&& s->c != Ctrl_G
&& (s->c != 'e'
|| (ccline.cmdfirstc == '=' && KeyTyped)
|| cmdline_star)) {
|| cmdline_star > 0)) {
vungetc(s->c);
s->c = Ctrl_BSL;
} else if (s->c == 'e') {
@ -1353,7 +1353,7 @@ static int command_line_handle_key(CommandLineState *s)
new_cmdpos = -1;
if (s->c == '=') {
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();
s->c = ESC;
} else {
@ -5590,6 +5590,9 @@ static struct cmdline_info *get_ccline_ptr(void)
*/
char_u *get_cmdline_str(void)
{
if (cmdline_star > 0) {
return NULL;
}
struct cmdline_info *p = get_ccline_ptr();
if (p == NULL)