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

Set As First To Compare button not being respected #126

Open
quattj opened this issue Sep 13, 2022 · 2 comments
Open

Set As First To Compare button not being respected #126

quattj opened this issue Sep 13, 2022 · 2 comments

Comments

@quattj
Copy link

quattj commented Sep 13, 2022

I am comparing two files. File One is the original file, in the first tab of a single view. File Two is the modified file, with lines added in to it, in the second tab of a single view.

Settings are:
First is: Old File
Old file position: Left/Top
Single-view default compare to: Previous

If I use the Set As First To Compare button on File One (first tab), then click the Compare button, File One moves to the right of the screen ("other view"), and shows grey gaps where lines have been added in File Two. File Two stays on the left of the screen, and incorrectly shows in red lines as having been removed from the file.

Expected behavior is that File One, marked as the First File, should stay on the left, and File Two should move to the right and show in green that lines have been added.

Notepad++ 8.4.4
Compare Plugin 2.0.2

@Yaron10
Copy link

Yaron10 commented Sep 13, 2022

@quattj,

Please remove Compare Plugin and install the much-improved ComparePlus by @pnedev.
The new plugin should be available in Notepad++ v8.4.5 PluginAdmin.

https://community.notepad-plus-plus.org/topic/23450/notepad-v8-4-5-release
https://community.notepad-plus-plus.org/topic/23434/new-plugin-compareplus-v1-0-0

If you still have an issue, please post it in https://github.com/pnedev/comparePlus.

@pnedev
Copy link
Contributor

pnedev commented Sep 14, 2022

@quattj ,

If I use the Set As First To Compare button on File One (first tab), then click the Compare button, File One moves to the right of the screen ("other view"), and shows grey gaps where lines have been added in File Two. File Two stays on the left of the screen, and incorrectly shows in red lines as having been removed from the file.

I suspect you haven't changed the current (active) file to File Two before clicking the Compare button.
The configuration you described means that when you use Set as first you select the old file but then you have to switch to the other file before starting the comparison. The plugin needs to know which is the second file and this is the active one before the compare.
If you simply use Set as first and then start compare from the same file the plugin couldn't know which is the second file and falls back to Single-view default compare to scenario which in your case is "compare current file to the previous one".

I have forgotten the details of the Compare-plugin implementation so the above is just an assumption. Best is to follow Yaron's advice.

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

3 participants