Skip to content

trimFinalNewlines clobbers undo history #39750

@ad8e

Description

@ad8e
  • VSCode Version: 1.18.1

Steps to Reproduce:

  1. Settings:
    {
    "files.trimFinalNewlines": true
    }
  2. Open a file. Type something. Undo. Save.
  3. Note that Redo doesn't work, even though no newlines were trimmed.
    (Even if it did trim newlines, is it friendly to clobber the undo history anyway? Hmm...)

trimTrailingWhitespace doesn't have this problem, despite its similar functionality.

Note that with "autosave after delay" on, trying to redo anything is effectively toast.

Reproduces without extensions: Yes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions