]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Update comment
authorPeter Jankuliak <p.jankuliak@gmail.com>
Sat, 13 May 2023 15:47:09 +0000 (16:47 +0100)
committerPeter Jankuliak <p.jankuliak@gmail.com>
Sat, 13 May 2023 15:47:09 +0000 (16:47 +0100)
autoload/lsp/util.vim

index f9add18ded704c62edb0603225eb77d2abf826ec..b9cb13844374fa5167187c98c5ff6a993d9b0acf 100644 (file)
@@ -112,9 +112,9 @@ export def LspFileToUri(fname: string): string
   var uri: string = fname->fnamemodify(':p')
 
   if has("win32unix")
-    # We're in Cygwin, we need to convert POSIX style paths to Windows style.
-    # `cygpath -m` converts paths of the form "/cygdrive/c/foo/bar" to "C:/foo/bar", and
-    # paths of the form "/home/pete/foo" to "C:/cygwin64/home/pete/foo".
+    # We're in Cygwin, convert POSIX style paths to Windows style.
+    # The substitution is to remove the '^@' escape character from the end of
+    # line.
     uri = system($'cygpath -m {uri}')->substitute('^\(\p*\).*$', '\=submatch(1)', "")
   endif