]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.0.1038: function name does not match what it is used for v9.0.1038
authorzeertzjq <zeertzjq@outlook.com>
Fri, 9 Dec 2022 11:36:36 +0000 (11:36 +0000)
committerBram Moolenaar <Bram@vim.org>
Fri, 9 Dec 2022 11:36:36 +0000 (11:36 +0000)
Problem:    Function name does not match what it is used for.
Solution:   Include the modifier in the name. (closes #11679)

src/ex_getln.c
src/version.c

index 44049c7618e4e80b98e2f4f33f5c9af5f5ddcf50..4bd200d33f889f3fb4267e5a480710d8bf46cdfb 100644 (file)
@@ -798,12 +798,13 @@ cmdline_init(void)
 }
 
 /*
- * Handle the backslash key pressed in the command-line mode.  CTRL-\ CTRL-N
- * goes to Normal mode, CTRL-\ CTRL-G goes to Insert mode when 'insertmode' is
- * set, CTRL-\ e prompts for an expression.
+ * Handle CTRL-\ pressed in Command-line mode:
+ * - CTRL-\ CTRL-N goes to Normal mode
+ * - CTRL-\ CTRL-G goes to Insert mode when 'insertmode' is set
+ * - CTRL-\ e prompts for an expression.
  */
     static int
-cmdline_handle_backslash_key(int c, int *gotesc)
+cmdline_handle_ctrl_bsl(int c, int *gotesc)
 {
     ++no_mapping;
     ++allow_keys;
@@ -832,8 +833,7 @@ cmdline_handle_backslash_key(int c, int *gotesc)
 
        /*
         * Replace the command line with the result of an expression.
-        * Need to save and restore the current command line, to be
-        * able to enter a new one...
+        * This will call getcmdline() recursively in get_expr_register().
         */
        if (ccline.cmdpos == ccline.cmdlen)
            new_cmdpos = 99999; // keep it at the end
@@ -843,9 +843,8 @@ cmdline_handle_backslash_key(int c, int *gotesc)
        c = get_expr_register();
        if (c == '=')
        {
-           // Need to save and restore ccline.  And set "textlock"
-           // to avoid nasty things like going to another buffer when
-           // evaluating an expression.
+           // Evaluate the expression.  Set "textlock" to avoid nasty things
+           // like going to another buffer.
            ++textlock;
            p = get_expr_line();
            --textlock;
@@ -1909,7 +1908,7 @@ getcmdline_int(
        // mode when 'insertmode' is set, CTRL-\ e prompts for an expression.
        if (c == Ctrl_BSL)
        {
-           res = cmdline_handle_backslash_key(c, &gotesc);
+           res = cmdline_handle_ctrl_bsl(c, &gotesc);
            if (res == CMDLINE_CHANGED)
                goto cmdline_changed;
            else if (res == CMDLINE_NOT_CHANGED)
@@ -1917,7 +1916,7 @@ getcmdline_int(
            else if (res == GOTO_NORMAL_MODE)
                goto returncmd;         // back to cmd mode
            c = Ctrl_BSL;               // backslash key not processed by
-                                       // cmdline_handle_backslash_key()
+                                       // cmdline_handle_ctrl_bsl()
        }
 
        if (c == cedit_key || c == K_CMDWIN)
index a39bdba2ec5c5eedfee47c88b4c3bcbf2361779f..aac1cc977922193d0131de0b2c1bde9fb2f7a710 100644 (file)
@@ -695,6 +695,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1038,
 /**/
     1037,
 /**/