Giter VIP home page Giter VIP logo

Comments (5)

Yaron10 avatar Yaron10 commented on July 30, 2024

Hello again,

Actually it would make more sense to activate the currently focused file.
So it should be good to implement this regardless of bcfcea5.
What do you think?

The only change then is replacing

        if (panelsOpened && (closingWin == -1))
        {
            ::SendMessage(nppData._scintillaSecondHandle, SCI_GRABFOCUS, 0, (LPARAM)0);
            skipAutoReset = true;
            SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_GOTO_ANOTHER_VIEW, 0);
            skipAutoReset = false;
        }

with

        if (panelsOpened && (closingWin == -1))
        {
            // Yaron - Get and activate the currently focused file.
            // It's still good to make sure the bottom view gets the focus so that "currentView == 0" when returning to Onw-View mode
            // ("currentView == 0" is the start/normal state; if multiple files are open, most would remain in the top view when comparing).

            LRESULT focusedBufferID = SendMessage(nppData._nppHandle, NPPM_GETCURRENTBUFFERID, 0, 0);

            ::SendMessage(nppData._scintillaSecondHandle, SCI_GRABFOCUS, 0, (LPARAM)0);
            skipAutoReset = true;
            SendMessage(nppData._nppHandle, WM_COMMAND, IDM_VIEW_GOTO_ANOTHER_VIEW, 0);

            activateBufferID(focusedBufferID, 0);

            skipAutoReset = false;
        }

I've just seen your last commits in the dev branch.
Wow! I don't understand anything in the major one. :)

Thank you.

Best regards.

from compareplus.

pnedev avatar pnedev commented on July 30, 2024

Hello Yaron,

I don't have time to review that at the moment.
I'll address this soon.
Thanks for your suggestions.

BR

from compareplus.

Yaron10 avatar Yaron10 commented on July 30, 2024

Hello Pavel,

Thank you.
I open an issue when I think of or encounter one.
I know you're currently working on other parts of the code. :)

BR

from compareplus.

pnedev avatar pnedev commented on July 30, 2024

This is fixed in the master branch, thanks.

BR

from compareplus.

Yaron10 avatar Yaron10 commented on July 30, 2024

Great. 👍
Many thanks.

BR

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.