From 7a6978ba29572ca4346a795fcbcb67e047d0b776 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Tue, 29 Mar 2022 20:23:58 +0200 Subject: [PATCH] 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 --- src/nvim/path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/path.c b/src/nvim/path.c index d3aa5e5bf2..75624778e3 100644 --- a/src/nvim/path.c +++ b/src/nvim/path.c @@ -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] == '-') {