Skip to content

1.19 breaks files.trimFinalNewlines #41256

Closed

Description

Hi.

After updating to 1.19 I noticed that automatic trimming of newlines has broken.

  • VSCode Version: 1.19.1
  • OS Version: macOS 10.12.6

Steps to Reproduce:

  1. Set files.trimFinalNewlines to true.
  2. Open up a new file.
  3. Add text/whatever and multiple newlines at the end of file.
  4. Save and see that nothing happens.
  5. Close file. You can even close VSCode.
  6. Re-open file/VSCode and try again.
  7. Nothing happens.

Extensions and language environments which do their own trimming work just fine (obviously).

Does this issue occur when all extensions are disabled?: Yes

Activity

  1. added
    workbench-editors
    on Jan 7, 2018
  2. bpasero commented on Jan 8, 2018

    @bpasero
    Contributor

    Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: https://code.visualstudio.com/insiders/

  3. added
    info-needed
    and removed
    workbench-editors
    on Jan 8, 2018
  4. bpasero commented on Jan 8, 2018

    @bpasero
    Contributor

    For stable: I wonder if this issue is being caused by an installed extension. Can you try to run VS Code without extensions? From the command line (NOT the integrated terminal in Code), execute: code --disable-extensions and try your steps again to see if it reproduces. If you see it is an issue with the extension, please file it against the extension repository itself.

  5. bpasero commented on Jan 8, 2018

    @bpasero
    Contributor

    seiks I can reproduce in stable, weird indeed. I can however not reproduce in insiders so it looks like this is fixed, even though I am not sure what change fixed it.

    Steps:

    • configure editor.formatOnSave: true
    • configure files.trimFinalNewlines: true
    • open a plain text file
    • add multiple new lines at the end
    • save

    => new lines are not removed in stable, but in insiders

    /cc Johannes Rieken (@jrieken)

  6. added
    bug
    and removed
    info-needed
    on Jan 8, 2018
  7. added this to the milestone on Jan 8, 2018
  8. locked and limited conversation to collaborators on Feb 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions