mirror of
https://github.com/neovim/neovim.git
synced 2025-11-26 04:00:45 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user