Skip to content

Settings editor saves settings.json lines with trailing whitespace #10887

@mrjoel

Description

@mrjoel

Windows Terminal version (or Windows build number)

1.9.1942.0

Other Software

No response

Steps to reproduce

I have my settings.json tracked in a dotfiles git repo. Recently (now that settings UI is available) I've noticed that the settings.json is save with a trailing space after a name. This appears to be the case when the name is an array or object whose contents continue onto the next line (i.e. the space after the name is always added without considering whether a string value or array/object value will follow.

Expected Behavior

Lines are trimmed when saving

Actual Behavior

Extra spaces are left behind for entries which span multiple lines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-SettingsIssues related to settings and customizability, for console or terminalHelp WantedWe encourage anyone to jump in on these.In-PRThis issue has a related PRIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-3A description (P3)Product-TerminalThe new Windows Terminal.good first issueThis is a fix that might be easier for someone to do as a first contribution

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions