Last Redo Moves Cursor Position

Steps to reproduce

  1. Make an edit to a document
  2. Scroll somewhere else in the document, and click there
  3. Undo the edit via Ctrl+Z
  4. Redo the edit via Ctrl+Y

Actual result

After the final redo command, it’ll also move back to step 2, moving the cursor position and jumping the document away from where the last redo edit/change actually occurred.

Expected result

Redo the document edit, but jump the cursor to the point the edit occurred, not where the cursor was last clicked which could be far away in the document. As a compromise, the user’s last manual cursor position could be separated from a redo containing an edit, which allows jumping back across the document with a second use of Ctrl+Y.

Environment

  • Operating system:
Windows 10
  • Debug info:
Obsidian version: v0.13.14
Installer version: v0.12.15
Login status: not logged in
Insider build toggle: off
Live preview: on
Legacy editor: off
Base theme: dark
Community theme: none
Snippets enabled: 3
Safe mode: on

I can’t repro. Post a screen recording of this happening in the help vault

Here’s a video recording. As shown:

  1. Typed “this is an edit” into the default Help Vault
  2. Scrolled to the end of document, clicked at the end
  3. Scrolled up, pressed Ctrl+Z to undo the edit (likewise, just pressing Ctrl+Z would have jumped to this line correctly even if I had not manually scrolled up)
  4. Pressed Ctrl+Y to redo the edit, jumped down to the incorrect line at end of document

thanks

1 Like

Upstream bug report: History redo should keep first selection · Issue #659 · codemirror/codemirror.next · GitHub

1 Like

will be fixed 0.13.19

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.