]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 8.2.4845: duplicate code v8.2.4845
authorzeertzjq <zeertzjq@outlook.com>
Fri, 29 Apr 2022 10:29:54 +0000 (11:29 +0100)
committerBram Moolenaar <Bram@vim.org>
Fri, 29 Apr 2022 10:29:54 +0000 (11:29 +0100)
Problem:    Duplicate code.
Solution:   Move code below if/else. (closes #10314)

src/misc1.c
src/version.c

index 28d49639bc4fa2f857bd17525f8458e69320056c..2d41e358be12c6e194c4b1c5f93f47413678a1da 100644 (file)
@@ -673,11 +673,6 @@ get_mode(char_u *buf)
        {
            buf[i++] = 'R';
            buf[i++] = 'v';
-
-           if (ins_compl_active())
-               buf[i++] = 'c';
-           else if (ctrl_x_mode_not_defined_yet())
-               buf[i++] = 'x';
        }
        else
        {
@@ -685,12 +680,12 @@ get_mode(char_u *buf)
                buf[i++] = 'R';
            else
                buf[i++] = 'i';
-
-           if (ins_compl_active())
-               buf[i++] = 'c';
-           else if (ctrl_x_mode_not_defined_yet())
-               buf[i++] = 'x';
        }
+
+       if (ins_compl_active())
+           buf[i++] = 'c';
+       else if (ctrl_x_mode_not_defined_yet())
+           buf[i++] = 'x';
     }
     else if ((State & CMDLINE) || exmode_active)
     {
index 55409858537679dac7f31197cbeb7a30ed61e28d..dc2c1ff3f1a65d80434c1f6ccfffdf5d4ae9bd0b 100644 (file)
@@ -746,6 +746,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    4845,
 /**/
     4844,
 /**/