Skip to content

Save-time whitespace trimming should go through undo system #312

Description

@eugenioenko

TrimTrailingWhitespace and InsertFinalNewline in SaveFile() mutate buffer lines directly, bypassing the undo system. In VS Code, these save-time cleanups are undoable with Ctrl+Z.

Fix: perform the trim/newline insertion at the app layer using EditCommands before calling SaveFile, so the changes are recorded in the undo stack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions