mirror of
https://github.com/neovim/neovim.git
synced 2025-09-07 11:58:17 +00:00
vim-patch:9.0.1038: function name does not match what it is used for (#21359)
Problem: Function name does not match what it is used for.
Solution: Include the modifier in the name. (closes vim/vim#11679)
ffa4e9b43a
This commit is contained in:
@@ -939,10 +939,10 @@ static int command_line_check(VimState *state)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Handle the backslash key pressed in the command-line mode.
|
/// Handle CTRL-\ pressed in Command-line mode:
|
||||||
/// CTRL-\ CTRL-N or CTRL-\ CTRL-G goes to Normal mode,
|
/// - CTRL-\ CTRL-N or CTRL-\ CTRL-G goes to Normal mode.
|
||||||
/// CTRL-\ e prompts for an expression.
|
/// - CTRL-\ e prompts for an expression.
|
||||||
static int command_line_handle_backslash_key(CommandLineState *s)
|
static int command_line_handle_ctrl_bsl(CommandLineState *s)
|
||||||
{
|
{
|
||||||
no_mapping++;
|
no_mapping++;
|
||||||
allow_keys++;
|
allow_keys++;
|
||||||
@@ -963,6 +963,7 @@ static int command_line_handle_backslash_key(CommandLineState *s)
|
|||||||
|
|
||||||
if (s->c == 'e') {
|
if (s->c == 'e') {
|
||||||
// Replace the command line with the result of an expression.
|
// Replace the command line with the result of an expression.
|
||||||
|
// This will call getcmdline() recursively in get_expr_register().
|
||||||
if (ccline.cmdpos == ccline.cmdlen) {
|
if (ccline.cmdpos == ccline.cmdlen) {
|
||||||
new_cmdpos = 99999; // keep it at the end
|
new_cmdpos = 99999; // keep it at the end
|
||||||
} else {
|
} else {
|
||||||
@@ -971,9 +972,8 @@ static int command_line_handle_backslash_key(CommandLineState *s)
|
|||||||
|
|
||||||
s->c = get_expr_register();
|
s->c = get_expr_register();
|
||||||
if (s->c == '=') {
|
if (s->c == '=') {
|
||||||
// Need to save and restore ccline. And set "textlock"
|
// Evaluate the expression. Set "textlock" to avoid nasty things
|
||||||
// to avoid nasty things like going to another buffer when
|
// like going to another buffer.
|
||||||
// evaluating an expression.
|
|
||||||
textlock++;
|
textlock++;
|
||||||
char *p = get_expr_line();
|
char *p = get_expr_line();
|
||||||
textlock--;
|
textlock--;
|
||||||
@@ -1244,7 +1244,7 @@ static int command_line_execute(VimState *state, int key)
|
|||||||
// CTRL-\ CTRL-N or CTRL-\ CTRL-G goes to Normal mode,
|
// CTRL-\ CTRL-N or CTRL-\ CTRL-G goes to Normal mode,
|
||||||
// CTRL-\ e prompts for an expression.
|
// CTRL-\ e prompts for an expression.
|
||||||
if (s->c == Ctrl_BSL) {
|
if (s->c == Ctrl_BSL) {
|
||||||
switch (command_line_handle_backslash_key(s)) {
|
switch (command_line_handle_ctrl_bsl(s)) {
|
||||||
case CMDLINE_CHANGED:
|
case CMDLINE_CHANGED:
|
||||||
return command_line_changed(s);
|
return command_line_changed(s);
|
||||||
case CMDLINE_NOT_CHANGED:
|
case CMDLINE_NOT_CHANGED:
|
||||||
@@ -1253,7 +1253,7 @@ static int command_line_execute(VimState *state, int key)
|
|||||||
return 0; // back to cmd mode
|
return 0; // back to cmd mode
|
||||||
default:
|
default:
|
||||||
s->c = Ctrl_BSL; // backslash key not processed by
|
s->c = Ctrl_BSL; // backslash key not processed by
|
||||||
// cmdline_handle_backslash_key()
|
// command_line_handle_ctrl_bsl()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user