zed
zed copied to clipboard
Support redo after autoformat changes buffer
trafficstars
Summary
Zed should (where possible) leverage CRDT to support redoing after a formatter has changed a buffer.
Description
Steps to reproduce:
- Create a file
a.yamlwith this as contents:foo: {a:b} - At the end of the line type
# fooand then undo (cmd-z) - Save (with formatting) which will change the file to:
foo: { a:b } - 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