aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJurica Bradaric <jbradaric@gmail.com>2016-09-18 21:52:30 +0200
committerJurica Bradaric <jbradaric@gmail.com>2016-09-25 22:06:57 +0200
commit641d4242904f4a9691bd7933beaf90f3cce81d97 (patch)
tree8af8458076b10390ef4451b241facf2f9509a8fe
parent6e55d99f433b5da7b3aeeb5585b663bf9bd22cd2 (diff)
downloadrneovim-641d4242904f4a9691bd7933beaf90f3cce81d97.tar.gz
rneovim-641d4242904f4a9691bd7933beaf90f3cce81d97.tar.bz2
rneovim-641d4242904f4a9691bd7933beaf90f3cce81d97.zip
vim-patch:7.4.1818
Problem: Help completion adds @en to all matches except the first one. Solution: Remove "break", go over all items. https://github.com/vim/vim/commit/89c79b99328b66f77f1d12dc8c6701dfe2c57f15
-rw-r--r--src/nvim/ex_getln.c15
-rw-r--r--src/nvim/version.c2
2 files changed, 8 insertions, 9 deletions
diff --git a/src/nvim/ex_getln.c b/src/nvim/ex_getln.c
index 7e6bf862d7..b098f7d4ee 100644
--- a/src/nvim/ex_getln.c
+++ b/src/nvim/ex_getln.c
@@ -2548,10 +2548,9 @@ static void cmdline_del(int from)
ccline.cmdpos = from;
}
-/*
- * 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)
{
if (cmd_silent)
@@ -3677,7 +3676,7 @@ static void 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];
*p++ = p_hlg[1];
@@ -3689,9 +3688,9 @@ static void cleanup_help_tags(int num_file, char_u **file)
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) {
// Sorting on priority means the same item in another language may
// be anywhere. Search all items for a match up to the "@en".
@@ -3704,8 +3703,8 @@ static void cleanup_help_tags(int num_file, char_u **file)
}
}
if (j == num_file) {
+ // item only exists with @en, remove it
file[i][len] = NUL;
- break;
}
}
}
diff --git a/src/nvim/version.c b/src/nvim/version.c
index 24c3d4eb5b..2f091ffc7a 100644
--- a/src/nvim/version.c
+++ b/src/nvim/version.c
@@ -623,7 +623,7 @@ static int included_patches[] = {
// 1821,
// 1820,
// 1819 NA
- // 1818,
+ 1818,
// 1817 NA
// 1816,
// 1815,