emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 20ab639: * lisp/vcursor.el (vcursor-get-char-count): Preserve poi


From: Stefan Monnier
Subject: master 20ab639: * lisp/vcursor.el (vcursor-get-char-count): Preserve point
Date: Wed, 24 Nov 2021 11:58:11 -0500 (EST)

branch: master
commit 20ab639d8946ca4c07c5238f015f8da17799c4e2
Author: Narendra Joshi <narendraj9@gmail.com>
Commit: Stefan Monnier <monnier@iro.umontreal.ca>

    * lisp/vcursor.el (vcursor-get-char-count): Preserve point
    
    Copyright-paperwork-exempt: yes
---
 lisp/vcursor.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/vcursor.el b/lisp/vcursor.el
index e219dc2..df65db3 100644
--- a/lisp/vcursor.el
+++ b/lisp/vcursor.el
@@ -788,9 +788,9 @@ out how much to copy."
 
   (vcursor-check)
   (with-current-buffer (overlay-buffer vcursor-overlay)
-    (let ((start (goto-char (overlay-start vcursor-overlay))))
-      (- (progn (apply func args) (point)) start)))
-  )
+    (save-excursion
+      (let ((start (goto-char (overlay-start vcursor-overlay))))
+        (- (progn (apply func args) (point)) start)))))
 
 ;; Make sure the virtual cursor is active.  Unless arg is non-nil,
 ;; report an error if it is not.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]