Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trimFinalNewlines clobbers undo history #39750

Closed
ad8e opened this issue Dec 6, 2017 · 1 comment
Closed

trimFinalNewlines clobbers undo history #39750

ad8e opened this issue Dec 6, 2017 · 1 comment
Assignees

Comments

@ad8e
Copy link

ad8e commented Dec 6, 2017

  • 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

@vscodebot vscodebot bot added the workbench label Dec 6, 2017
@bpasero bpasero assigned rebornix and unassigned bpasero Dec 6, 2017
@bpasero bpasero added editor and removed workbench labels Dec 6, 2017
@AiryShift
Copy link
Contributor

I'll have a look at this since I was the one who wrote the code in the first place, my bad. Should I look to use executeEdits instead of pushEditOperations?

rebornix added a commit that referenced this issue Dec 11, 2017
rebornix added a commit that referenced this issue Dec 11, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants