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

Tab count compare bug #23636

Closed
justnonamenoname opened this issue Mar 30, 2017 · 4 comments
Closed

Tab count compare bug #23636

justnonamenoname opened this issue Mar 30, 2017 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug diff-editor Diff editor mode issues verified Verification succeeded
Milestone

Comments

@justnonamenoname
Copy link

justnonamenoname commented Mar 30, 2017

  • VSCode Version: Tested on 1.7-1.10
  • OS Version: Win7

Steps to Reproduce:

1.Open
1.txt
2.txt
2.Compare
3.You will see compare is incorrect and is full different
tab1
4.If you add 1 Tab to all lines in 2.txt compare will result correct diff only in tabs
tab2

@alexdima
Copy link
Member

@justnonamenoname

Could you please attach the two txt files on github?

Here's what I get on gta-samp.com
image

@alexdima alexdima added the info-needed Issue requires more information from poster label Mar 30, 2017
@alexdima alexdima added this to the Backlog milestone Mar 30, 2017
@justnonamenoname
Copy link
Author

1.txt
2.txt

@alexdima
Copy link
Member

alexdima commented Mar 30, 2017

Thank you. This appears to be a case of changes only to the whitespace. The diff editor falls back to character-by-character comparison in case the lines differ only via whitespace.

23636

@alexdima alexdima added diff-editor Diff editor mode issues bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Mar 30, 2017
@alexdima alexdima modified the milestones: July 2017, Backlog Jul 5, 2017
@alexdima
Copy link
Member

alexdima commented Jul 5, 2017

I reimplemented how diffing works when trim whitespace is not ignored:

  • first compute a diff with trim whitespace ignored
  • then do line-level trim whitespace diffing for lines which are equal when trim whitespace is ignored.
  • IMHO, this gives the best result w.r.t. what we'd expect:

before:

screen shot 2017-07-05 at 09 50 47

after:

screen shot 2017-07-05 at 09 48 29

@roblourens roblourens added the verified Verification succeeded label Aug 2, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug diff-editor Diff editor mode issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants