vim-patch:7.4.1820

Problem:    Removing language from help tags too often.
Solution:   Only remove @en when not needed. (Hirohito Higashi)

9ccaae04c6
This commit is contained in:
Jurica Bradaric
2016-09-25 21:40:37 +02:00
parent 641d424290
commit 9114790c4c
3 changed files with 130 additions and 5 deletions

View File

@@ -3688,10 +3688,7 @@ static void cleanup_help_tags(int num_file, char_u **file)
if (len <= 0) {
continue;
}
if (STRCMP(file[i] + len, buf) == 0) {
// remove the default language
file[i][len] = NUL;
} else if (STRCMP(file[i] + len, "@en") == 0) {
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".
int j;
@@ -3708,6 +3705,19 @@ static void cleanup_help_tags(int num_file, char_u **file)
}
}
}
if (*buf != NUL) {
for (int i = 0; i < num_file; i++) {
int len = (int)STRLEN(file[i]) - 3;
if (len <= 0) {
continue;
}
if (STRCMP(file[i] + len, buf) == 0) {
// remove the default language
file[i][len] = NUL;
}
}
}
}
/*