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)
https://github.com/vim/vim/commit/94e7d345c156a722bb161b73238c4ba1d27ec586
This commit is contained in:
dundargoc
2022-03-30 02:23:58 +08:00
committed by GitHub
parent f1d5a2e82d
commit 7a6978ba29
+1 -1
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] == '-') {