]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 7.4.1818 v7.4.1818
authorBram Moolenaar <Bram@vim.org>
Thu, 5 May 2016 15:18:41 +0000 (17:18 +0200)
committerBram Moolenaar <Bram@vim.org>
Thu, 5 May 2016 15:18:41 +0000 (17:18 +0200)
Problem:    Help completion adds @en to all matches except the first one.
Solution:   Remove "break", go over all items.

src/ex_getln.c
src/version.c

index 11824907eea450606b2f59042d777b10bd88ece3..26fed59724e234eb0a0216da0a12c2d9332a97ee 100644 (file)
@@ -3189,8 +3189,9 @@ cmdline_del(int from)
 #endif
 
 /*
- * this function is called when the screen size changes and with incremental
- * search
+ * This function is called when the screen size changes and with incremental
+ * search and in other situations where the command line may have been
+ * overwritten.
  */
     void
 redrawcmdline(void)
@@ -4505,7 +4506,7 @@ cleanup_help_tags(int num_file, char_u **file)
     char_u     buf[4];
     char_u     *p = buf;
 
-    if (p_hlg[0] != NUL)
+    if (p_hlg[0] != NUL && (p_hlg[0] != 'e' || p_hlg[1] != 'n'))
     {
        *p++ = '@';
        *p++ = p_hlg[0];
@@ -4518,10 +4519,10 @@ cleanup_help_tags(int num_file, char_u **file)
        len = (int)STRLEN(file[i]) - 3;
        if (len <= 0)
            continue;
-       if (i == 0 && STRCMP(file[i] + len, buf) == 0)
+       if (STRCMP(file[i] + len, buf) == 0)
        {
+           /* remove the default language */
            file[i][len] = NUL;
-           break;
        }
        else if (STRCMP(file[i] + len, "@en") == 0)
        {
@@ -4533,10 +4534,8 @@ cleanup_help_tags(int num_file, char_u **file)
                        && STRNCMP(file[i], file[j], len + 1) == 0)
                    break;
            if (j == num_file)
-           {
+               /* item only exists with @en, remove it */
                file[i][len] = NUL;
-               break;
-           }
        }
     }
 }
index 79ca5cdc73c2a708c6fad5ecc20699db4d77cee9..1045c21ece5242cd33798602d4f204df5fd69ab4 100644 (file)
@@ -753,6 +753,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    1818,
 /**/
     1817,
 /**/