0
0
mirror of https://github.com/vim/vim.git synced 2025-07-25 10:54:51 -04:00

patch 9.0.1038: function name does not match what it is used for

Problem:    Function name does not match what it is used for.
Solution:   Include the modifier in the name. (closes #11679)
This commit is contained in:
zeertzjq 2022-12-09 11:36:36 +00:00 committed by Bram Moolenaar
parent 98aeb2100c
commit ffa4e9b43a
2 changed files with 12 additions and 11 deletions

View File

@ -798,12 +798,13 @@ cmdline_init(void)
} }
/* /*
* Handle the backslash key pressed in the command-line mode. CTRL-\ CTRL-N * Handle CTRL-\ pressed in Command-line mode:
* goes to Normal mode, CTRL-\ CTRL-G goes to Insert mode when 'insertmode' is * - CTRL-\ CTRL-N goes to Normal mode
* set, CTRL-\ e prompts for an expression. * - CTRL-\ CTRL-G goes to Insert mode when 'insertmode' is set
* - CTRL-\ e prompts for an expression.
*/ */
static int static int
cmdline_handle_backslash_key(int c, int *gotesc) cmdline_handle_ctrl_bsl(int c, int *gotesc)
{ {
++no_mapping; ++no_mapping;
++allow_keys; ++allow_keys;
@ -832,8 +833,7 @@ cmdline_handle_backslash_key(int c, int *gotesc)
/* /*
* Replace the command line with the result of an expression. * Replace the command line with the result of an expression.
* Need to save and restore the current command line, to be * This will call getcmdline() recursively in get_expr_register().
* able to enter a new one...
*/ */
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
@ -843,9 +843,8 @@ cmdline_handle_backslash_key(int c, int *gotesc)
c = get_expr_register(); c = get_expr_register();
if (c == '=') if (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;
p = get_expr_line(); p = get_expr_line();
--textlock; --textlock;
@ -1909,7 +1908,7 @@ getcmdline_int(
// mode when 'insertmode' is set, CTRL-\ e prompts for an expression. // mode when 'insertmode' is set, CTRL-\ e prompts for an expression.
if (c == Ctrl_BSL) if (c == Ctrl_BSL)
{ {
res = cmdline_handle_backslash_key(c, &gotesc); res = cmdline_handle_ctrl_bsl(c, &gotesc);
if (res == CMDLINE_CHANGED) if (res == CMDLINE_CHANGED)
goto cmdline_changed; goto cmdline_changed;
else if (res == CMDLINE_NOT_CHANGED) else if (res == CMDLINE_NOT_CHANGED)
@ -1917,7 +1916,7 @@ getcmdline_int(
else if (res == GOTO_NORMAL_MODE) else if (res == GOTO_NORMAL_MODE)
goto returncmd; // back to cmd mode goto returncmd; // back to cmd mode
c = Ctrl_BSL; // backslash key not processed by c = Ctrl_BSL; // backslash key not processed by
// cmdline_handle_backslash_key() // cmdline_handle_ctrl_bsl()
} }
if (c == cedit_key || c == K_CMDWIN) if (c == cedit_key || c == K_CMDWIN)

View File

@ -695,6 +695,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 */
/**/
1038,
/**/ /**/
1037, 1037,
/**/ /**/