From 20ab639d8946ca4c07c5238f015f8da17799c4e2 Mon Sep 17 00:00:00 2001 From: Narendra Joshi Date: Wed, 24 Nov 2021 11:58:03 -0500 Subject: [PATCH] * 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 e219dc2d1a5..df65db39e38 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. -- 2.39.2