pnedev / comparePlus

Compare plugin for Notepad++
GNU General Public License v3.0
1.01k stars 139 forks source link

"Next" and "Previous" skip changed lines when they are right after one another #378

Closed mike406 closed 9 months ago

mike406 commented 9 months ago

Hello, I am actually not sure if it is a bug or intentional but I did notice that using the "Next" and "Previous" buttons will skip lines with changes if they are one after another (no extra lines in between). To demonstrate this consider these two files:

file 1:

This line is the same

This line is different
This line is also different
This line is only in the left file

This line is the same

file 2:

This line is the same

This line is differentt
This line is also differentt

This line is the same
This line is only in the right file

If you compare file 2 to file 1 and hit Next, the cursor jumps from line 3 to line 7, skipping the difference on line 4. Likewise, if you start at the bottom of the file and hit "Previous" twice, it will go to line 3 and skip line 4 as well. If this is expected behavior then please disregard this thread but I was not fully sure if it was. Thank you.

pnedev commented 9 months ago

Hello @mike406 ,

It is intentional - "Next" and "Previous" go from one diff block (that might be a lot of lines, not just one) to another - these are separated by at least one matching line.

BR