core-jump: fixed a typo
For example, in `rust-mode`, `(spacemacs//get-jump-handlers)` returns `((lsp-ui-peek-find-definitions :async t) evil-goto-definition)`. So `-handler` is bound to the first one, i.e. `(lsp-ui-peek-find-definitions :async t)`. We need to figure out whether it's asynchronous by checking the `:async` keyword argument. But before this commit, we wrongly checks the second handler in the handlers list. Even when multiple handlers do exist and they are all async, the typo made it sub-optimal since it uses not the best handler. This commit fixes that.
This commit is contained in:
parent
0bdddfc165
commit
db15a2d5a0
1 changed files with 2 additions and 3 deletions
|
@ -76,9 +76,8 @@ They are in order: `spacemacs-jump-handlers',
|
|||
(let ((old-buffer (current-buffer))
|
||||
(old-point (point)))
|
||||
(dolist (-handler (spacemacs//get-jump-handlers))
|
||||
(let ((handler (if (listp -handler) (car -handler) -handler))
|
||||
(async (when (listp -handler)
|
||||
(plist-get (cdr -handler) :async))))
|
||||
(let* ((handler (if (listp -handler) (car -handler) -handler))
|
||||
(async (plist-get (cdr handler) :async)))
|
||||
(ignore-errors
|
||||
(call-interactively handler))
|
||||
(when (or (eq async t)
|
||||
|
|
Reference in a new issue