aboutsummaryrefslogtreecommitdiff
path: root/evil-common.el
diff options
context:
space:
mode:
authorVasilij Schneidermann <mail@vasilij.de>2017-04-10 21:52:52 +0200
committerVasilij Schneidermann <mail@vasilij.de>2017-04-10 21:52:52 +0200
commit5912c22a2220ac394bd7cdc2379c0ffc7b18ea85 (patch)
tree992bb560a60e2639b6afd4cbe1507c22014614b6 /evil-common.el
parent273a714e2d073257f6604d03be53c5fd784117c4 (diff)
Use `save-excursion` to preserve point
Closes #807
Diffstat (limited to 'evil-common.el')
-rw-r--r--evil-common.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/evil-common.el b/evil-common.el
index 03c1347..cc96f64 100644
--- a/evil-common.el
+++ b/evil-common.el
@@ -1529,8 +1529,9 @@ backwards."
(setq reset-parser t))
;; global parser state is out of state, use local one
(let* ((pnt (point))
- (state (progn (beginning-of-defun)
- (parse-partial-sexp (point) pnt nil nil (syntax-ppss))))
+ (state (save-excursion
+ (beginning-of-defun)
+ (parse-partial-sexp (point) pnt nil nil (syntax-ppss))))
(bnd (bounds-of-evil-string-at-point state)))
(when (and bnd (< (point) (cdr bnd)))
;; currently within a string