unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#60143: 29.0.60; command `undo-redo` don't restore cursor position
@ 2022-12-17  1:42 yinz Liu
  2022-12-18 11:03 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: yinz Liu @ 2022-12-17  1:42 UTC (permalink / raw)
  To: 60143

[-- Attachment #1: Type: text/plain, Size: 442 bytes --]

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)))`

[-- Attachment #2: Type: text/html, Size: 2823 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-19 16:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-17  1:42 bug#60143: 29.0.60; command `undo-redo` don't restore cursor position yinz Liu
2022-12-18 11:03 ` Eli Zaretskii
2022-12-19  1:42   ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-12-19  3:35     ` Eli Zaretskii
2022-12-19 16:09       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).