Giter VIP home page Giter VIP logo

Comments (14)

pnedev avatar pnedev commented on July 30, 2024

Hello Yaron,

This sounds like a proper operation of the plugin to me :)
The plugin has actually restored the situation from before the compare operation with the only difference that during the compare you have opened in the other view another file and it remains in the other view where it was opened.

What would you like the behavior to be?

Thanks.
BR

from compareplus.

Yaron10 avatar Yaron10 commented on July 30, 2024

Hello Pavel,

Single-View and view's ID is MAIN_VIEW.
Open two files.
Compare.
Open a third file at top.
Clear Compare (or All Compares).

Result:

Single-View mode.

Single-View and view's ID is SUB_VIEW.
Open two files.
Compare.
Open a third file at top.
Clear Compare (or All Compares).

Result:

We're still in Two-Views mode.

Expected behavior: the same result as in a case where the users opens two files, moves one to the other view, opens a third file at top and then moves back the file at bottom to the other view.

Thank you.

Best regards.

from compareplus.

pnedev avatar pnedev commented on July 30, 2024

Hello Yaron,

I don't find this to be a problem really.

If you have 2 files in view 1 (primary view) and compare them and then open 3rd file in view 2 and clear compare then you would end up again in 2 view mode. Would that be a problem too?

After I fix the "after closing equal files the single view id is the secondary one" problem then the view management will be completely control-able by the user and he should be aware where he wants his files to be opened.

BR

from compareplus.

Yaron10 avatar Yaron10 commented on July 30, 2024

Hello Pavel,

If you have 2 files in view 1 (primary view) and compare them and then open 3rd file in view 2 and clear compare then you would end up again in 2 view mode. Would that be a problem too?

In this case it's the expected result.
I think the rule should be: "Fix what we broke". Move back the file we moved originally.
IOW: have the same result as in a case where the user manually moves the file from one view to the other and back.

After I fix the "after closing equal files the single view id is the secondary one" problem then the view management will be completely control-able by the user and he should be aware where he wants his files to be opened.

I don't understand that. :)

Thank you.
BR

from compareplus.

xylographe avatar xylographe commented on July 30, 2024

Move back the file we moved originally.

Agreed. If it's technically possible, obtrusions should be avoided.

from compareplus.

pnedev avatar pnedev commented on July 30, 2024

Hello @Yaron10 and @xylographe ,

@Yaron10 ,

I don't understand that. :)

This seems to be the next of our "misunderstandings". Those are becoming notorious ;)
Jokes aside, it's because I didn't explain clear enough.
I meant that after fixing #40 the user wouldn't "arrive" in single sub-view mode by mistake - he would be aware he is in sub-view mode.

@Yaron10 and @xylographe ,

I think the rule should be: "Fix what we broke". Move back the file we moved originally.

I also agree with that. Isn't it what we are currently doing?

  1. We have two files (A and B) in single sub-view mode.
  2. We compare those, B is moved to main view.
  3. We open from main view another file C.
  4. We get back to A and B and clear the compare -> B is moved back to sub-view where it initially was.
  5. C is left in main view where it was opened. Had we opened it from the sub-view it would have been in the sub-view and we would have ended again in single sub-view mode with A, B, C in that view.

What am I missing?
Thanks.

BR

from compareplus.

Yaron10 avatar Yaron10 commented on July 30, 2024

Hello Pavel,

Thanks for the explanation.
Misunderstandings are part of life. It's good we can joke about them. :)

  1. We open from main view another file C.

Indeed, no problem in this case.
In my scenario you open C in the top (sub) view.

Single-View and view's ID is SUB_VIEW.
Open two files.
Compare.
Open a third file at top.
Clear Compare (or All Compares).

Result:

We're still in Two-Views mode.

EDIT: just a confusion. I'll correct it shortly.

Thank you.

BR

from compareplus.

xylographe avatar xylographe commented on July 30, 2024

Hi Pavel.

In this example the original situation is not restored:

  • single view, four files open: A, B, C, D (from left to right)
  • activate file B, and press Alt+F
  • activate file C, and press Alt+D
  • press Alt+Shift+D (back to single view)

The file order has changed to A, B, D, C (from left to right)

Similar example:

  • single view, four files open: A, B, C, D (from left to right)
  • activate file A, and press Alt+F
  • activate file B, and press Alt+D
  • press Alt+Shift+D (back to single view)

The file order has changed to A, C, D, B

from compareplus.

pnedev avatar pnedev commented on July 30, 2024

Hello @xylographe ,

You are talking about a different thing here - you are referring to view files order.
And yes - that changes after compare, I agree.
I can think about restoring that also after compare but that might be difficult and I can't promise anything.
You can open a new issue about that just to have this situation logged.
Thanks.

BR

from compareplus.

Yaron10 avatar Yaron10 commented on July 30, 2024

Hello again Pavel,

You are right. 👍
And I was wrong. Partly.

That requires a good explanation. :)

An average user who doesn't regularly use "Move to Other View" (and certainly doesn't know how it's handled and that Compare uses it) can still easily find himself in Single-View SUB_VIEW.
And this is a most common use-case: start NPP, open two files, compare and close the file at top.

That user would expect to have the same result in both cases I've mentioned above: return to Single-View mode.

Here they are again:

Single-View and view's ID is MAIN_VIEW.
Open two files.
Compare.
Open a third file at top.
Clear Compare (or All Compares).

Result:

Single-View mode.

Single-View and view's ID is SUB_VIEW.
Open two files.
Compare.
Open a third file at top.
Clear Compare (or All Compares).

Result:

We're still in Two-Views mode.

He wouldn't understand the inconsistency when apparently he has performed the exact same actions.
For him the top/left pane is the primary view.

So I was wrong in requesting to "Activate moved file before returning to Single-View". We (you :)) do that.
But it IS an issue.

You have argued before that Compare is not NPP's view manager and we should also think about the experienced user.
It can be further discussed, but you can close this issue if you want. :)

Thank you.

Best regards.

from compareplus.

pnedev avatar pnedev commented on July 30, 2024

Hello Yaron,

An average user who doesn't regularly use "Move to Other View" (and certainly doesn't know how it's handled and that Compare uses it) can still easily find himself in Single-View SUB_VIEW.
And this is a most common use-case: start NPP, open two files, compare and close the file at top.

Have you tested this scenario?
If that's the case this is the bug actually.
If you open 2 files in main view, compare and close any of the files you SHOULD have the other file returned to its original view -> main one. If that's not the case please report.
Thanks.

BR

from compareplus.

Yaron10 avatar Yaron10 commented on July 30, 2024

Hello Pavel,

I take my hat off! Brilliant. 👍
Why didn't you mention it? :)
Could you explain in two sentences how you control the view's ID? Is it SCI_GETDOCPOINTER?

Not being able to re-compare the current Compare I used a previous version for my regular work.

Well, I was completely wrong. :)

Thank you very much.

I've had a busy day. I'll refer to other issues later.

Best regards.

from compareplus.

pnedev avatar pnedev commented on July 30, 2024

Hello Yaron,

No problem, confusions often happen, I'm glad we cleared this point.

Could you explain in two sentences how you control the view's ID? Is it SCI_GETDOCPOINTER?

I'm not sure I understand the question properly. I keep the original scintilla view Id for each compared file and after compare return the file there. NPPM_GETCURRENTVIEW is the message Id.

Have a good rest, we'll continue another time.

BR

from compareplus.

Yaron10 avatar Yaron10 commented on July 30, 2024

Hello Pavel,

Thank you very much. Again: this is absolutely great.

I won't bother you with the implementation. You have more important things to do. :)

Best regards.

from compareplus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.