GNU bug report logs - #60143
29.0.60; command `undo-redo` don't restore cursor position

Previous Next

Package: emacs;

Reported by: yinz Liu <liuyinz95 <at> gmail.com>

Date: Sat, 17 Dec 2022 03:35:04 UTC

Severity: wishlist

Found in version 29.0.60

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: yinz Liu <liuyinz95 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 29.0.60; command `undo-redo` don't restore cursor position
Date: Sat, 17 Dec 2022 09:42:28 +0800
[Message part 1 (text/plain, inline)]
aaaa ! bbbb @ cccc #


1. when cursor at position "#", call `undo', cursor jump to "@"

2. when cursor at position "@", call `undo-redo', text "cccc" restore,

   but cursor still remain in "@", don't move to "#".


my workaround fow now:


in function primitive-undo
<https://github.com/emacs-mirror/emacs/blob/149e6e03b3f860c3d78031bf3377d8a4c99a7a64/lisp/simple.el#L3622-L3624>
 :


change L3624 to : `(goto-char (+ pos (length string)))`
[Message part 2 (text/html, inline)]

This bug report was last modified 1 year and 290 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.