aboutsummaryrefslogtreecommitdiff
path: root/evil-macros.el
diff options
context:
space:
mode:
authorAlexander Shukaev <projects@Alexander.Shukaev.name>2018-06-07 15:56:22 +0200
committerEivind Fonn <evfonn@gmail.com>2018-09-11 11:59:46 +0200
commit10749f71599f78a19187221b470cbb6f927b7fba (patch)
treedbf0279473fe7542b356a702c9c0646b3ddc37c1 /evil-macros.el
parentef965243577cb410a8406216f83ab1c819351424 (diff)
Add option to enable Evil in minibuffer(s)
Diffstat (limited to 'evil-macros.el')
-rw-r--r--evil-macros.el17
1 files changed, 9 insertions, 8 deletions
diff --git a/evil-macros.el b/evil-macros.el
index ed98e7d..b29c0d1 100644
--- a/evil-macros.el
+++ b/evil-macros.el
@@ -527,22 +527,23 @@ if COUNT is positive, and to the left of it if negative.
"Read a motion from the keyboard and return its buffer positions.
The return value is a list (BEG END), or (BEG END TYPE) if
RETURN-TYPE is non-nil."
- (let ((motion (or evil-operator-range-motion
- (when (evil-ex-p) 'evil-line)))
- (type evil-operator-range-type)
- (range (evil-range (point) (point)))
- command count modifier)
+ (let* ((evil-ex-p (and (not (minibufferp)) (evil-ex-p)))
+ (motion (or evil-operator-range-motion
+ (when evil-ex-p 'evil-line)))
+ (type evil-operator-range-type)
+ (range (evil-range (point) (point)))
+ command count modifier)
(setq evil-this-type-modified nil)
(evil-save-echo-area
(cond
;; Ex mode
- ((and (evil-ex-p) evil-ex-range)
+ ((and evil-ex-p evil-ex-range)
(setq range evil-ex-range))
;; Visual selection
- ((and (not (evil-ex-p)) (evil-visual-state-p))
+ ((and (not evil-ex-p) (evil-visual-state-p))
(setq range (evil-visual-range)))
;; active region
- ((and (not (evil-ex-p)) (region-active-p))
+ ((and (not evil-ex-p) (region-active-p))
(setq range (evil-range (region-beginning)
(region-end)
(or evil-this-type 'exclusive))))