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

Diff Algorithm Appears to be Broken in Pulsar 1.22.0 #183

Open
xian7 opened this issue Nov 1, 2024 · 0 comments
Open

Diff Algorithm Appears to be Broken in Pulsar 1.22.0 #183

xian7 opened this issue Nov 1, 2024 · 0 comments

Comments

@xian7
Copy link

xian7 commented Nov 1, 2024

Platform:

Windows 11 Pro 23H2
Pulsar 1.22.0 x64 (fresh install)
Note: No previous version of Atom installed on this system (its a new work laptop)

Observation:

Every attempt I've made to diff two files has resulted in highlighting that doesn't appear to make any sense. The results I'm seeing don't seem to follow a specific pattern 100% of the time, but usually I see a large block of green highlight starting at the top of the left pane file and a smaller number of lines, usually two, highlighted red starting at the top of the right pane file, even when these top sections of the files are identical.

Example:
Using a simple expect script as a test (hello1.txt), I made a copy (hello2.txt) that has two new lines inserted at lines 11 and 12 in hello2 and then three lines removed starting after line 34 in hello2 (lines 33-35 in hello1). The first 10 lines are identical. With hello1 in the left pane and hello2 in the right pane, split-diff highlights the first 10 lines on the left in green followed by a two-line grey gap corresponding to the two new lines on the right. On the right, the first two lines are highlighted red and the two new lines at 11 and 12 are not highlighted. Following this section of the files, rest of the differences appear to be highlighted correctly. (see screenshot)

Screenshot 2024-11-01 102101

Note: It appears that something is causing the algorithm to see a difference at the start of the files where one does not exist which appears to lead to nonsensical highlighting, but then seems to correct itself after a few legitimate differences are encountered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant