zed icon indicating copy to clipboard operation
zed copied to clipboard

Support redo after autoformat changes buffer

Open notpeter opened this issue 5 months ago • 0 comments
trafficstars

Summary

Zed should (where possible) leverage CRDT to support redoing after a formatter has changed a buffer.

Description

Steps to reproduce:

  1. Create a file a.yaml with this as contents: foo: {a:b}
  2. At the end of the line type # foo and then undo (cmd-z)
  3. Save (with formatting) which will change the file to:
    foo: { a:b }
    
  4. Attempt to redo (cmd-shift-z) to restore the comment. Nothing happens.

See also:

  • https://github.com/zed-industries/zed/issues/17455
  • https://github.com/zed-industries/zed/discussions/31021
  • https://github.com/zed-industries/zed/discussions/31307
  • https://github.com/zed-industries/zed/issues/31917

notpeter avatar Jun 03 '25 14:06 notpeter