diff options
| author | Vasilij Schneidermann <mail@vasilij.de> | 2017-04-10 21:52:52 +0200 |
|---|---|---|
| committer | Vasilij Schneidermann <mail@vasilij.de> | 2017-04-10 21:52:52 +0200 |
| commit | 5912c22a2220ac394bd7cdc2379c0ffc7b18ea85 (patch) | |
| tree | 992bb560a60e2639b6afd4cbe1507c22014614b6 /evil-common.el | |
| parent | 273a714e2d073257f6604d03be53c5fd784117c4 (diff) | |
Use `save-excursion` to preserve point
Closes #807
Diffstat (limited to 'evil-common.el')
| -rw-r--r-- | evil-common.el | 5 |
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 |
