aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/window.c
diff options
context:
space:
mode:
authorsigmaSd <bedisnbiba@gmail.com>2022-08-24 07:38:06 +0100
committerGitHub <noreply@github.com>2022-08-23 23:38:06 -0700
commita4e4609d62c38b7b949e5c8079dfa5f10803bdcd (patch)
tree0013889ba8fdc091d8173b3806e2ecdbc9213163 /src/nvim/window.c
parent9a100ee169f80cbfe45872939ed9b4f70f6bfe3f (diff)
downloadrneovim-a4e4609d62c38b7b949e5c8079dfa5f10803bdcd.tar.gz
rneovim-a4e4609d62c38b7b949e5c8079dfa5f10803bdcd.tar.bz2
rneovim-a4e4609d62c38b7b949e5c8079dfa5f10803bdcd.zip
fix(path): path_is_url returns false for "foo:/" #19797
Problem: path_to_url() returns false for single-slash URIs ("foo:/" vs "foo://"). This is not compliant with the URI spec. https://url.spec.whatwg.org/#url-representation LSP in particular allows single-slash URIs. Solution: Relax path_to_url() to accept single-slash URIs. This is not fully compliant (only ":" is required by the spec), but it is hopefully good enough without causing false-positives in typical text files. ref https://url.spec.whatwg.org/#windows-drive-letter ref https://github.com/neovim/neovim/pull/19773 ref https://github.com/neovim/neovim/pull/19773#issuecomment-1214763769
Diffstat (limited to 'src/nvim/window.c')
-rw-r--r--src/nvim/window.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/window.c b/src/nvim/window.c
index 89611177f9..7ad5e49d2f 100644
--- a/src/nvim/window.c
+++ b/src/nvim/window.c
@@ -6582,7 +6582,7 @@ char_u *file_name_in_line(char_u *line, int col, int options, long count, char_u
/*
* Search forward for the last char of the file name.
- * Also allow "://" when ':' is not in 'isfname'.
+ * Also allow ":/" when ':' is not in 'isfname'.
*/
len = 0;
while (vim_isfilec(ptr[len]) || (ptr[len] == '\\' && ptr[len + 1] == ' ')