diff options
author | Bram Moolenaar <Bram@vim.org> | 2016-05-05 17:18:41 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2016-05-05 17:18:41 +0200 |
commit | 89c79b99328b66f77f1d12dc8c6701dfe2c57f15 (patch) | |
tree | bbb6dedac5f7f54db8c050873375b9973d19c520 /src/ex_getln.c | |
parent | cefe4f994853c2d4866e2aa4ea3e3f36ab2fea13 (diff) | |
download | vim-git-89c79b99328b66f77f1d12dc8c6701dfe2c57f15.tar.gz |
patch 7.4.1818v7.4.1818
Problem: Help completion adds @en to all matches except the first one.
Solution: Remove "break", go over all items.
Diffstat (limited to 'src/ex_getln.c')
-rw-r--r-- | src/ex_getln.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/ex_getln.c b/src/ex_getln.c index 11824907e..26fed5972 100644 --- a/src/ex_getln.c +++ b/src/ex_getln.c @@ -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; - } } } } |