mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
vim-patch:8.1.0433: mapping can obtain text from inputsecret()
Problem: Mapping can obtain text from inputsecret(). (Tommy Allen)
Solution: Disallow CTRL-R = and CTRL-\ e when using inputsecret().
31cbadf74b
This commit is contained in:
parent
8240b8b596
commit
28ac4a99f2
@ -793,9 +793,11 @@ static int command_line_execute(VimState *state, int key)
|
|||||||
no_mapping--;
|
no_mapping--;
|
||||||
// CTRL-\ e doesn't work when obtaining an expression, unless it
|
// CTRL-\ e doesn't work when obtaining an expression, unless it
|
||||||
// is in a mapping.
|
// is in a mapping.
|
||||||
if (s->c != Ctrl_N && s->c != Ctrl_G && (s->c != 'e'
|
if (s->c != Ctrl_N
|
||||||
|| (ccline.cmdfirstc == '='
|
&& s->c != Ctrl_G
|
||||||
&& KeyTyped))) {
|
&& (s->c != 'e'
|
||||||
|
|| (ccline.cmdfirstc == '=' && KeyTyped)
|
||||||
|
|| cmdline_star)) {
|
||||||
vungetc(s->c);
|
vungetc(s->c);
|
||||||
s->c = Ctrl_BSL;
|
s->c = Ctrl_BSL;
|
||||||
} else if (s->c == 'e') {
|
} else if (s->c == 'e') {
|
||||||
@ -1350,7 +1352,8 @@ static int command_line_handle_key(CommandLineState *s)
|
|||||||
// a new one...
|
// a new one...
|
||||||
new_cmdpos = -1;
|
new_cmdpos = -1;
|
||||||
if (s->c == '=') {
|
if (s->c == '=') {
|
||||||
if (ccline.cmdfirstc == '=') { // can't do this recursively
|
if (ccline.cmdfirstc == '=' // can't do this recursively
|
||||||
|
|| cmdline_star) { // or when typing a password
|
||||||
beep_flush();
|
beep_flush();
|
||||||
s->c = ESC;
|
s->c = ESC;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user