Fix #2293: easymotion with evil operators
Reverts fix for #1672, but provides a workaround: (map! :n "gl" (λ! (+evil/easymotion 'normal 'global)))
This commit is contained in:
parent
c7ab4fafc6
commit
fe0c5e135d
2 changed files with 16 additions and 10 deletions
|
@ -93,13 +93,20 @@ the only window, use evil-window-move-* (e.g. `evil-window-move-far-left')."
|
|||
(interactive) (+evil--window-swap 'down))
|
||||
|
||||
;;;###autoload
|
||||
(defun +evil/easymotion ()
|
||||
"Invoke and lazy-load `evil-easymotion' without compromising which-key
|
||||
integration."
|
||||
(interactive)
|
||||
(require 'evil-easymotion)
|
||||
(setq prefix-arg current-prefix-arg)
|
||||
(push '(t . easymotion) unread-command-events))
|
||||
(defun +evil/easymotion (&optional state keymap)
|
||||
"Invoke `evil-easymotion' lazily without compromising which-key integration."
|
||||
(interactive (list 'motion 'global))
|
||||
(let ((prefix (this-command-keys)))
|
||||
(require 'evil-easymotion)
|
||||
(evil-define-key* state keymap prefix evilem-map)
|
||||
(setq prefix-arg current-prefix-arg
|
||||
unread-command-events
|
||||
(mapcar (lambda (e) (cons t e))
|
||||
(vconcat (when evil-this-operator
|
||||
(where-is-internal evil-this-operator
|
||||
nil
|
||||
t))
|
||||
prefix)))))
|
||||
|
||||
;;;###autoload (autoload '+evil:apply-macro "editor/evil/autoload/evil" nil t)
|
||||
(evil-define-operator +evil:apply-macro (beg end)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue