* lisp/vcursor.el (vcursor-get-char-count): Preserve point

Copyright-paperwork-exempt: yes
This commit is contained in:
Narendra Joshi 2021-11-24 11:58:03 -05:00 committed by Stefan Monnier
parent 9d3d972f97
commit 20ab639d89

View file

@ -788,9 +788,9 @@ out how much to copy."
(vcursor-check) (vcursor-check)
(with-current-buffer (overlay-buffer vcursor-overlay) (with-current-buffer (overlay-buffer vcursor-overlay)
(let ((start (goto-char (overlay-start vcursor-overlay)))) (save-excursion
(- (progn (apply func args) (point)) start))) (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, ;; Make sure the virtual cursor is active. Unless arg is non-nil,
;; report an error if it is not. ;; report an error if it is not.