]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Always print no references found error when there are no references
authorAndreas Louv <andreas@louv.dk>
Mon, 3 Apr 2023 22:06:37 +0000 (00:06 +0200)
committerAndreas Louv <andreas@louv.dk>
Mon, 3 Apr 2023 22:06:37 +0000 (00:06 +0200)
autoload/lsp/lspserver.vim

index 220982570bf524b3bacf51acf8e740f2d6da6fed..b93d8853639067a8d2ba001bab0fd4f974643080 100644 (file)
@@ -780,11 +780,7 @@ def ShowReferences(lspserver: dict<any>, peek: bool): void
   var reply = lspserver.rpc('textDocument/references', param)
 
   # Result: Location[] | null
-  if reply->empty()
-    return
-  endif
-
-  if reply.result->empty()
+  if reply->empty() || reply.result->empty()
     util.WarnMsg('Error: No references found')
     return
   endif