`(:textDocument
,(eglot--TextDocumentIdentifier))
:cancel-on-input non-essential))
- (head (and res (elt res 0))))
- (eglot--dcase head
- (((SymbolInformation)) (eglot--imenu-SymbolInformation res))
- (((DocumentSymbol)) (eglot--imenu-DocumentSymbol res)))))
+ (head (and (cl-plusp (length res)) (elt res 0))))
+ (when head
+ (eglot--dcase head
+ (((SymbolInformation)) (eglot--imenu-SymbolInformation res))
+ (((DocumentSymbol)) (eglot--imenu-DocumentSymbol res))))))
(cl-defun eglot--apply-text-edits (edits &optional version)
"Apply EDITS for current buffer if at VERSION, or if it's nil."