Open garyking opened 5 years ago
(Experimental duplicate detection) Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:
Stage selected ranges
only works if the diffs are visible. If you show whitespace changes, does the action work?
Yeah, if I show whitespace changes, then it works. But I'm asking, why does it work that way? Meaning, if I have whitespace changes hidden, and I stage a range, then the textual changes are staged, but the whitespace changes are not staged. So I end up with a commit that has changes committed without any indentation, so I have to then stage and commit the indentation separately.
Having whitespace changes hidden definitely makes it easier to identify changes, but having to remember to turn it on before any staging every time, is a bit tedious.
To anyone arriving from Google, the current workaround is "diffEditor.ignoreTrimWhitespace": false
.
Stage selected ranges
only works if the diffs are visible. If you show whitespace changes, does the action work?
@joaomoreno whitespace changes should be displayed (i.e. not ignored) by default.
For Python , whitespace changes are a critical syntatic and semantic aspect of the code . ignoring whitespace changes by default will break Python code change commits
Thanks @teresaejunior - what a pain in the ass, will use work around. I noticed using selective diff was breaking and had to revert or append commits often. This is currently pretty bad UX :/
Issue Type: Bug
if (true)
staged, since it's a text change, but the block contained within its braces as not staged, since it's just an indentation change.VS Code version: Code 1.29.1 (bc24f98b5f70467bc689abf41cc5550ca637088e, 2018-11-15T19:06:21.742Z) OS version: Darwin x64 18.0.0