From: Peter Jankuliak Date: Mon, 29 May 2023 06:33:50 +0000 (+0100) Subject: Minor refactor X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=6b03f8809dc7c2c7b3465935a051528f4cfaa0cf;p=vim-lsp.git Minor refactor --- diff --git a/autoload/lsp/util.vim b/autoload/lsp/util.vim index 2b157de..a02f655 100644 --- a/autoload/lsp/util.vim +++ b/autoload/lsp/util.vim @@ -117,15 +117,13 @@ export def LspFileToUri(fname: string): string return resolvedUris[fname_full] endif - var uri: string + var uri: string = fname_full if has("win32unix") # 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 {fname_full}')->substitute('^\(\p*\).*$', '\=submatch(1)', "") - else - uri = fname_full + uri = system($'cygpath -m {uri}')->substitute('^\(\p*\).*$', '\=submatch(1)', "") endif var on_windows: bool = false