vim-patch:8.2.3551: checking first character of url twice (#17910)

Problem:    Checking first character of url twice.
Solution:   Only check once. (closes vim/vim#9026)
94e7d345c1
This commit is contained in:
dundargoc 2022-03-29 20:23:58 +02:00 committed by GitHub
parent f1d5a2e82d
commit 7a6978ba29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1777,7 +1777,7 @@ int path_with_url(const char *fname)
}
// check body: alpha or dash
for (p = fname; (isalpha(*p) || (*p == '-')); p++) {}
for (p = fname + 1; (isalpha(*p) || (*p == '-')); p++) {}
// check last char is not a dash
if (p[-1] == '-') {