mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
ex_cmds: fix pvs/v781
This commit is contained in:
@@ -4945,17 +4945,21 @@ help_heuristic(
|
|||||||
* If the match is more than 2 chars from the start, multiply by 200 to
|
* If the match is more than 2 chars from the start, multiply by 200 to
|
||||||
* put it after matches at the start.
|
* put it after matches at the start.
|
||||||
*/
|
*/
|
||||||
if (ASCII_ISALNUM(matched_string[offset]) && offset > 0
|
if (offset > 0
|
||||||
&& ASCII_ISALNUM(matched_string[offset - 1]))
|
&& ASCII_ISALNUM(matched_string[offset])
|
||||||
|
&& ASCII_ISALNUM(matched_string[offset - 1])) {
|
||||||
offset += 10000;
|
offset += 10000;
|
||||||
else if (offset > 2)
|
} else if (offset > 2) {
|
||||||
offset *= 200;
|
offset *= 200;
|
||||||
if (wrong_case)
|
}
|
||||||
|
if (wrong_case) {
|
||||||
offset += 5000;
|
offset += 5000;
|
||||||
/* Features are less interesting than the subjects themselves, but "+"
|
}
|
||||||
* alone is not a feature. */
|
// Features are less interesting than the subjects themselves, but "+"
|
||||||
if (matched_string[0] == '+' && matched_string[1] != NUL)
|
// alone is not a feature.
|
||||||
|
if (matched_string[0] == '+' && matched_string[1] != NUL) {
|
||||||
offset += 100;
|
offset += 100;
|
||||||
|
}
|
||||||
return (int)(100 * num_letters + STRLEN(matched_string) + offset);
|
return (int)(100 * num_letters + STRLEN(matched_string) + offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user