zed icon indicating copy to clipboard operation
zed copied to clipboard

Undo tree display / navigation

Open haasn opened this issue 1 year ago • 3 comments

Check for existing issues

  • [X] Completed

Describe the feature

A very popular (and useful) feature among editors is the ability to maintain, display, and navigate an undo tree. This way you can e.g.:

  • Quickly view a previous version of the buffer you're editing
  • Make changes after undoing a (sequence of) commands without losing progress
  • Inspect your history of saved versions and quickly navigate between older variants (e.g. for testing)
  • Easily go back to the latest version of a buffer after a sequence of undo commands

And definitely more. In general, it gives us a way to track changes on a level of granularity too fine for e.g. git commits to sensibly track.

If applicable, add mockups / screenshots to help present your vision of the feature

Vim's undotree plugin can offer some inspiration:

image

(Observe also the fantastic utility here of having #15097)

haasn avatar Sep 05 '24 19:09 haasn

for reference (to show that there is demand), here is an equivalent issue in vscode

  • https://github.com/microsoft/vscode/issues/20889

aeshna-cyanea avatar Jan 19 '25 20:01 aeshna-cyanea

I just lost a couple of hours of work due my messing up while doing a bunch of undoes and redos. This would've been a life saver.

leo-fresha avatar Mar 03 '25 19:03 leo-fresha

This is an absolute must for Zed, especially considering whenever you save the buffer, it will (by default) run the formatter, which will completely delete the entire Redo history, even if the buffer is unchanged by the formatter. This is one of the roughest edges around Zed right now.

muja avatar Apr 30 '25 12:04 muja

I agree this more important than ever, with AI agent-written changes becoming ever more common.

cies avatar May 07 '25 13:05 cies

UNDO TREE in emacs must be a reference, this is the best undo tree implementation

SL-RU avatar May 17 '25 09:05 SL-RU

Hi there! 👋 We're working to clean up our issue tracker by closing older bugs that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and it will be kept open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, it will close automatically in 14 days. Thanks for your help!

github-actions[bot] avatar Nov 19 '25 07:11 github-actions[bot]

Hi there! 👋 We're working to clean up our issue tracker by closing older bugs that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Zed, please let us know by commenting on this issue, and it will be kept open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, it will close automatically in 14 days. Thanks for your help!

Yes, this can be reproduced in the latest version of Zed:

  1. open Zed
  2. no undo tree

muja avatar Nov 19 '25 07:11 muja

Sorry, the stalebot upstream went over eager - please ignore.

miguelraz avatar Nov 19 '25 12:11 miguelraz