Skip to content

Commit

Permalink
avy.el (avy-action-goto): Don't push mark when region is active
Browse files Browse the repository at this point in the history
* avy.el (avy-action-goto): When the region is active, the user probably
  doesn't want to move the mark.

Fixes #84
  • Loading branch information
abo-abo committed Jul 29, 2015
1 parent e8cebf1 commit 30067dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion avy.el
Expand Up @@ -452,7 +452,9 @@ Set `avy-style' according to COMMMAND as well."

(defun avy-action-goto (pt)
"Goto PT."
(unless (= pt (point)) (push-mark))
(unless (or (= pt (point))
(region-active-p))
(push-mark))
(goto-char pt))

(defun avy-action-mark (pt)
Expand Down

0 comments on commit 30067dd

Please sign in to comment.