diff options
| author | Frank Fischer <frank-fischer@shadow-soft.de> | 2015-03-13 20:08:55 +0100 |
|---|---|---|
| committer | Frank Fischer <frank-fischer@shadow-soft.de> | 2015-03-13 20:08:55 +0100 |
| commit | 0bcc640c9dc00ddbaec3d9225f8ddb5e6ed6e40a (patch) | |
| tree | d08f59c00e877e4e645f22c4ba5cd64aac3a0f47 | |
| parent | acaa87cbc9caf91f7bf5134a47a9babb5e0a903d (diff) | |
support motion modifiers for backward ace-jumps (fix #495)
If an ace-jump moves backwards the motion must not be set to exclusive
in all cases. A char modifier causes it to be changed to inclusive.
| -rw-r--r-- | evil-integration.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/evil-integration.el b/evil-integration.el index da52bb8..716a361 100644 --- a/evil-integration.el +++ b/evil-integration.el @@ -405,7 +405,10 @@ the mark and entering `recursive-edit'." ;; to `evil-find-char-backward' (when (and (equal buf (current-buffer)) (< (point) pnt)) - (setq evil-this-type 'exclusive))))) + (setq evil-this-type + (cond + ((eq evil-this-type 'exclusive) 'inclusive) + ((eq evil-this-type 'inclusive) 'exclusive))))))) (evil-define-motion evil-ace-jump-char-to-mode (count) "Jump visually to the char in front of a char using ace-jump." @@ -419,7 +422,10 @@ the mark and entering `recursive-edit'." (< (point) pnt)) (progn (or (eobp) (forward-char)) - (setq evil-this-type 'exclusive)) + (setq evil-this-type + (cond + ((eq evil-this-type 'exclusive) 'inclusive) + ((eq evil-this-type 'inclusive) 'exclusive)))) (backward-char))))) (evil-define-motion evil-ace-jump-line-mode (count) |
