From: Indelog Date: Mon, 8 Nov 2021 14:25:22 +0000 (+0100) Subject: Fix util#LspUriToFile with handler#processDocSymbolReply X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=f7331927a44e08a0ff341e1c4088dd2076422690;p=vim-lsp.git Fix util#LspUriToFile with handler#processDocSymbolReply When get handler#processDocSymbol, textDocument.uri does not begin with 'file://', so util#LspUriToFile truncate the file name. --- diff --git a/autoload/util.vim b/autoload/util.vim index 54c334e..38ece44 100644 --- a/autoload/util.vim +++ b/autoload/util.vim @@ -56,7 +56,8 @@ export def LspUriToFile(uri: string): string # MS-Windows URI uri_decoded = uri_decoded[8 : ] uri_decoded = uri_decoded->substitute('/', '\\', 'g') - else + # On GNU/Linux (pattern not end with `:`) + elseif uri_decoded =~? '^file:///\a' uri_decoded = uri_decoded[7 : ] endif