Skip to content

Can't always use redo after save  #31917

@michael-ud

Description

@michael-ud

Summary

In certain circumstances, saving a buffer incorrectly prevents redo after save.

  1. In terminal
mkdir /tmp/issue31917
cd $_
echo 'foo' > foo.txt
zed . foo.txt:1:1
  1. enter, cms-s, cmd-z, cmd-s, cmd-shift-z

Expected Behavior: Redo (cmd-shift-z) should restore the newline

Actual Behavior: Redo action does nothing

In other circumstances the redo buffer is correctly preserved (as expected). See comment below for one such case where Zed handles it correctly.

For cases when the buffer changes during format_on_save, see this feature request:

Settings

Reproducible with empty settings {}
No formatter.

Zed Version and System Specs

Zed: v0.188.5 (Zed)
OS: macOS 15.5.0
Memory: 16 GiB
Architecture: aarch64

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:editorFeedback for code editing, formatting, editor iterations, etcmeta:regressionthis used to work and now doesn'tstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduce

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions