changeset 26034:9b2c6cea573c v8.2.3551

patch 8.2.3551: checking first character of url twice Commit: https://github.com/vim/vim/commit/94e7d345c156a722bb161b73238c4ba1d27ec586 Author: itchyny <itchyny@hatena.ne.jp> Date: Thu Oct 21 18:01:13 2021 +0100 patch 8.2.3551: checking first character of url twice Problem: Checking first character of url twice. Solution: Only check once. (closes https://github.com/vim/vim/issues/9026)
author Bram Moolenaar <Bram@vim.org>
date Thu, 21 Oct 2021 19:15:04 +0200
parents a65546a90889
children 5bcf2c40d6c8
files src/misc1.c src/version.c
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/misc1.c
+++ b/src/misc1.c
@@ -2643,7 +2643,7 @@ path_with_url(char_u *fname)
 	return 0;
 
     // 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
--- a/src/version.c
+++ b/src/version.c
@@ -758,6 +758,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    3551,
+/**/
     3550,
 /**/
     3549,