| Summary: | [Search]Compare view diff annotation is one line off on some rare files. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [ECD] Orion | Reporter: | libing wang <libingw> | ||||
| Component: | Client | Assignee: | libing wang <libingw> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 0.4 | ||||||
| Target Milestone: | 0.4 RC1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
libing wang
Created attachment 210084 [details]
Screen shot
fixed with http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=8ea6c50c1ab37d056be007e4c356417938ee2e84. Basically the jsDiffAdapter.js assumed that all diff blocks returned by jsdiff.diffLines are the following pattern: unchanged block (foo\n) added block or nothing(bar\n) removed block or nothing(coo\n) unchanged block (fooo\n) added block or nothing(baar\n) removed block or nothing(cooo\n) But sometimes it returns something like this unchanged block (foo\n) added block or nothing(bar) removed block or nothing(coo) unchanged block (\nfooo\n) added block or nothing(baar) removed block or nothing(cooo) We should be careful on counting the unchanged block length because at very beginning it may contain a line delimeter that is supposed to be contained in the previous added/removed block. |