Skip to content

Commit b2e9bb0

Browse files
author
sunlin
authored
fix broken for submition !2284 (#2287)
There is an warning message after !2284 > Warning (lsp-mode): Failed to process xref entry for filename ’’: Read error: is a directory ..." The root cause is, when the parameter `locations` is nil, the daaa291#diff-413c3dbb8dc902306ccb23932847ff082352d6123fd5668ea89b24cd8ebcbedbL4521-L4524 will get `nil` for `locations`, but the change daaa291#diff-413c3dbb8dc902306ccb23932847ff082352d6123fd5668ea89b24cd8ebcbedbR4520-R4528 will get `(nil)`. The fix will keep `locations` is `nil`.
1 parent daaa291 commit b2e9bb0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lsp-mode.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4525,7 +4525,7 @@ type Location, LocationLink, Location[] or LocationLink[]."
45254525
(or (lsp-location? fst)
45264526
(lsp-location-link? fst))))
45274527
(append locations nil)
4528-
(list locations)))
4528+
(when locations (list locations))))
45294529

45304530
(cl-labels ((get-xrefs-in-file
45314531
(file-locs)

0 commit comments

Comments
 (0)