Bail early from eglot--apply-text-edits if nothing to do
* lisp/progmodes/eglot.el (eglot--apply-text-edits): Early return.
This commit is contained in:
parent
61d571760b
commit
a4d97811ed
1 changed files with 2 additions and 1 deletions
|
@ -3219,8 +3219,9 @@ Returns a list as described in docstring of `imenu--index-alist'."
|
|||
,(eglot--TextDocumentIdentifier))
|
||||
:cancel-on-input non-essential))))))
|
||||
|
||||
(defun eglot--apply-text-edits (edits &optional version)
|
||||
(cl-defun eglot--apply-text-edits (edits &optional version)
|
||||
"Apply EDITS for current buffer if at VERSION, or if it's nil."
|
||||
(unless edits (cl-return-from eglot--apply-text-edits))
|
||||
(unless (or (not version) (equal version eglot--versioned-identifier))
|
||||
(jsonrpc-error "Edits on `%s' require version %d, you have %d"
|
||||
(current-buffer) version eglot--versioned-identifier))
|
||||
|
|
Loading…
Add table
Reference in a new issue