Skip to content

Commit 89c79b9

Browse files
committed
patch 7.4.1818
Problem: Help completion adds @en to all matches except the first one. Solution: Remove "break", go over all items.
1 parent cefe4f9 commit 89c79b9

2 files changed

Lines changed: 9 additions & 8 deletions

File tree

src/ex_getln.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3189,8 +3189,9 @@ cmdline_del(int from)
31893189
#endif
31903190

31913191
/*
3192-
* this function is called when the screen size changes and with incremental
3193-
* search
3192+
* This function is called when the screen size changes and with incremental
3193+
* search and in other situations where the command line may have been
3194+
* overwritten.
31943195
*/
31953196
void
31963197
redrawcmdline(void)
@@ -4505,7 +4506,7 @@ cleanup_help_tags(int num_file, char_u **file)
45054506
char_u buf[4];
45064507
char_u *p = buf;
45074508

4508-
if (p_hlg[0] != NUL)
4509+
if (p_hlg[0] != NUL && (p_hlg[0] != 'e' || p_hlg[1] != 'n'))
45094510
{
45104511
*p++ = '@';
45114512
*p++ = p_hlg[0];
@@ -4518,10 +4519,10 @@ cleanup_help_tags(int num_file, char_u **file)
45184519
len = (int)STRLEN(file[i]) - 3;
45194520
if (len <= 0)
45204521
continue;
4521-
if (i == 0 && STRCMP(file[i] + len, buf) == 0)
4522+
if (STRCMP(file[i] + len, buf) == 0)
45224523
{
4524+
/* remove the default language */
45234525
file[i][len] = NUL;
4524-
break;
45254526
}
45264527
else if (STRCMP(file[i] + len, "@en") == 0)
45274528
{
@@ -4533,10 +4534,8 @@ cleanup_help_tags(int num_file, char_u **file)
45334534
&& STRNCMP(file[i], file[j], len + 1) == 0)
45344535
break;
45354536
if (j == num_file)
4536-
{
4537+
/* item only exists with @en, remove it */
45374538
file[i][len] = NUL;
4538-
break;
4539-
}
45404539
}
45414540
}
45424541
}

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,8 @@ static char *(features[]) =
753753

754754
static int included_patches[] =
755755
{ /* Add new patch number below this line */
756+
/**/
757+
1818,
756758
/**/
757759
1817,
758760
/**/

0 commit comments

Comments
 (0)