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

Implicit "Clear Compare" when trying to compare a file to itself in single view mode #53

Closed
xylographe opened this issue Apr 25, 2016 · 8 comments

Comments

@xylographe
Copy link
Contributor

Hello Pavel,

Scenario: I triggered "Clear Compare" while comparing focal file F to some other file A. Now I'm back in single view, and I want to compare F to B. I automatically press Alt-F, but when I look at the tab bar to locate file B, I notice that B is the adjacent file. ATM pressing Alt-D will open a message box telling me, I cannot compare a file to itself. I think, in this situation it is rather obvious that I don't want to compare F to F, but F to adjacent file B.

Therefore, I suggest, that CP will perform an implicit "Clear Compare" (pretend the Alt-F didn't happen) iff NPP is in single view mode, and the focal file is not the leftmost file in that single view. In any other case CP's behaviour shall remain the same (message box).

@pnedev
Copy link
Owner

pnedev commented Apr 25, 2016

Hello @xylographe ,

Sounds fair, OK.
What about disregarding Alt-F always if Alt-D is used on the same file?

BR

@pnedev
Copy link
Owner

pnedev commented Apr 25, 2016

Fixed in master to always disregard Alt-F if we are comparing file to itself.
Please try and write back if it is OK. Thanks.

BR

@pnedev pnedev closed this as completed Apr 25, 2016
@xylographe
Copy link
Contributor Author

Hello Pavel,

What about disregarding Alt-F always if Alt-D is used on the same file?

I'm not sure… Suppose the focal file is the leftmost file, then perhaps it was the Alt-D that was inadvertently pressed? I think, it could depend on whether Alt-D followed Alt-F immediately, or if some other action (Ctl-PgUp/Ctl-PgDown for example) happened in between.

Personally, I wouldn't mind "disregarding Alt-F always…", other CP users may be of different opinion. :)

@pnedev
Copy link
Owner

pnedev commented Apr 25, 2016

Hello @xylographe ,

Then I'll keep it that way - disregard Alt-F always when comparing to self.
It wouldn't hurt anybody I suppose.
Thanks.

BR

@xylographe
Copy link
Contributor Author

Thank you, Pavel. That was quick! :)

I tested CP db01d49. I think, the new behaviour ("always disregard" in single view, "alert" in double view) is a good solution to the prematurely typed Alt-F.

@pnedev
Copy link
Owner

pnedev commented Apr 26, 2016

Hello @xylographe ,

It now actually disregards Alt-F always (no matter if it is single or double view).
Please write back if you think that might be a problem. Thanks.

BR

@xylographe
Copy link
Contributor Author

Oops, my mistake. I think, I know what happened yesterday: I must have pressed Alt-C (assigned to "Clone to Other View"), Alt-F and Alt-D, then was shown a message box. Of course, that was a completely different message ("Files match"), but I didn't take the time to read it, presuming it was the cannot-compare-to-itself message.

Having examined the double view situation a little better this morning, I'm sure, it won't be a problem in double view, because both files are visible, so you get a compare between those two files, as you would expect.

@pnedev
Copy link
Owner

pnedev commented Apr 26, 2016

OK then, thanks.

BR

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

No branches or pull requests

2 participants