From f7331927a44e08a0ff341e1c4088dd2076422690 Mon Sep 17 00:00:00 2001 From: Indelog Date: Mon, 8 Nov 2021 15:25:22 +0100 Subject: [PATCH] Fix util#LspUriToFile with handler#processDocSymbolReply When get handler#processDocSymbol, textDocument.uri does not begin with 'file://', so util#LspUriToFile truncate the file name. --- autoload/util.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.48.1