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

Support white-space changes in the gutter change markers #10007

Closed
eldarshamukhamedov opened this issue Aug 1, 2016 · 13 comments
Closed

Support white-space changes in the gutter change markers #10007

eldarshamukhamedov opened this issue Aug 1, 2016 · 13 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Milestone

Comments

@eldarshamukhamedov
Copy link

eldarshamukhamedov commented Aug 1, 2016

  • VSCode Version: 1.3.1 (e6b4afa)
  • OS Version: Linux Mint 18 (Linux 4.4.0-31-generic x86_64 GNU/Linux)
  • Git Version: 2.9.2

Steps to Reproduce:

  1. Init new git repo: git init test && cd test
  2. Create a test file and commit it: echo "Hello" > README.md && git add . && git commit -m "test"
  3. Prepend some spaces: echo " Hello" > README.md
  4. Open in VSCode: code .
  5. Note that README.md is correctly tracked as modified in the Git/VCS tab
  6. Open README.md
  7. Note that the white-space change does not show up in the gutter (.margin-view-overlays)

In this screenshot, I would expect a blue glyph (.git-dirty-modified-diff-glyph) to show up on line 1:

My user settings:

{
    "editor.renderWhitespace": true,
    "editor.tabSize": 2,
    "explorer.openEditors.visible": 0,
    "editor.rulers": [100, 120]
}
@rmunn
Copy link
Contributor

rmunn commented Aug 1, 2016

I would actually prefer for whitespace changes not to show up in the Git gutter, at least in some circumstances. So I would like a configurable option to specify whether whitespace changes should or should not be considered in the gutter.

@eldarshamukhamedov
Copy link
Author

@rmunn Agreed, more config options is always better. I'm coming from Atom/WebStorm, so this behavior threw me off a bit.

@kieferrm kieferrm added the git GIT issues label Aug 2, 2016
@joaomoreno
Copy link
Member

@alexandrudima What do you think about providing a checkbox to enable/disable whitespace in the diff editor?

@joaomoreno joaomoreno added this to the Backlog milestone Aug 3, 2016
@joaomoreno joaomoreno added the bug Issue identified by VS Code Team member as probable bug label Aug 3, 2016
@alexdima
Copy link
Member

@joaomoreno 👍

@Dominik-K
Copy link

@joaomoreno It would be nice to whitelist the activation for specific file formats, as well. E.g. in YAML or Python files, indentation changes code behavior.

@joaomoreno joaomoreno added the help wanted Issues identified as good community contribution opportunities label Apr 25, 2017
@joaomoreno joaomoreno removed their assignment Apr 25, 2017
@Gruntfuggly
Copy link

If vscode is going to ignore whitespace changes in the diff view, it should not stage the changes either.

@antcodd
Copy link

antcodd commented Oct 25, 2017

There is a setting for this for the diff editor that seems to work, diffEditor.ignoreTrimWhitespace. Why not the gutter?

@sant123
Copy link

sant123 commented Nov 2, 2017

@antcodd using this setting worked.

{
  "diffEditor.ignoreTrimWhitespace": false
}

Thank you!

@eldarshamukhamedov
Copy link
Author

Thanks, @sant123, that works for the Git diff view and is very helpful :) Git gutter still ignores trimmed whitespace, though, so I think keeping this issue open is still valid.

@vasylnakvasiuk
Copy link

+1
Please add similar to:
"gitGutter.ignoreTrimWhitespace": true/false

@joaomoreno joaomoreno added good first issue Issues identified as good for first-time contributors feature-request Request for new features or functionality scm General SCM compound issues and removed bug Issue identified by VS Code Team member as probable bug git GIT issues labels Nov 23, 2017
@joaomoreno joaomoreno removed their assignment Nov 23, 2017
@joaomoreno joaomoreno changed the title White-space changes do not show up in Git gutter Support white-space changes in the gutter change markers Nov 23, 2017
@vkbo
Copy link

vkbo commented Nov 23, 2017

Although it is fine to be able to turn this off, the gutter really should he able to show the changes that actually goes into the git commit. I depend on this feature for a couple of the projects I work on as unnecessary changes in indentation clutters the change history.

@joaomoreno
Copy link
Member

Actually, the diffEditor.ignoreTrimWhitespace is already working for gutter decorations: #40411

@joaomoreno joaomoreno self-assigned this Jan 24, 2018
@joaomoreno joaomoreno added *duplicate Issue identified as a duplicate of another issue(s) and removed feature-request Request for new features or functionality good first issue Issues identified as good for first-time contributors help wanted Issues identified as good community contribution opportunities scm General SCM compound issues labels Jan 24, 2018
@vkbo
Copy link

vkbo commented Jan 26, 2018

Yes, but this is not about the diff editor, but the editor. This issue is not resolved as of 1.19.2.

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 10, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests