Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Undo a change made in the source-files between v6.5.4 and v6.7

    Help wanted · · · – – – · · ·
    2
    17
    7272
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Claudia Frank
      Claudia Frank last edited by

      Hi Yaron,

      we talk about the conext menu do we?
      If so, I still get it poped up when right clicking. Tested with 6.7 and worked as well.

      Cheers
      Claudia

      1 Reply Last reply Reply Quote 0
      • Yaron
        Yaron last edited by Yaron

        Hello Claudia,

        Thanks for testing and replying. I appreciate that.

        If I remember correctly the problem does not occur if the Spell Checker plugin is installed and its items appear in the context-menu.

        I’ve just downloaded a new portable NPP v6.9 (which doesn’t include the Spell Checker) and there it is.
        Also, please select one line only by clicking its number in the Line-Margin.

        EDIT:
        The context-menu does show but “Copy” etc. is disabled.

        Best regards.

        1 Reply Last reply Reply Quote 0
        • Claudia Frank
          Claudia Frank last edited by

          Hello Yaron,

          it looks like that this has been introduced with updated scintilla control.
          See here.

          Right clicks are about the object being pointed at.
          Right click over selection retains selection and displays context menu for that selection.
          Right click outside selection moves selection there and then displays corresponding context menu.
          This issue has been discussed and the behaviour changed several times before reaching the current consensus.

          So I assume it needs new code to revert it. You made me curious how this could be achieved. Let’s see.

          Cheers
          Claudia

          1 Reply Last reply Reply Quote 0
          • Claudia Frank
            Claudia Frank last edited by

            Hello Yaron,

            seems not to be an easy one.
            a) the line margin isn’t set as sensitive therefore there is no notification sent when clicking on it.
            b) when setting sensitive - notification is sent but now margin click doesn’t select line anymore
            c) right click is ignored at all - no notification sent

            Hmm … I guess I need to sleep on it …

            Cheers
            Claudia

            1 Reply Last reply Reply Quote 0
            • Yaron
              Yaron last edited by

              Hello Claudia,

              As always I’m impressed by the way you find the root of the problem before I even have time to say Jack Robinson. Or even blink!
              I’ll spare you your nickname this time. :)

              Thank you very much. I really appreciate it.

              And have a good sleep…

              Best regards.

              1 Reply Last reply Reply Quote 0
              • Claudia Frank
                Claudia Frank last edited by

                Hello Yaron,

                today I have download the scintilla repository and I try starting to understand what or how scintilla handles this.
                I’m not convinced anymore that only new scintilla component has been broken your favourite feature
                because the context menu layout used/defined by scintilla is different to what we see in npp.

                As it is Easter I guess I won’t get a chance to look into it until tuesday next week.

                So, if you celebrate it happy easter otherwise happy weekend ;-)

                Cheers
                Claudia

                1 Reply Last reply Reply Quote 0
                • Claudia Frank
                  Claudia Frank last edited by

                  Yaron,

                  just to be sure - you know that a triple click selects the whole line, don’t you?
                  It needs to getting used to it but maybe a solution.

                  Cheers
                  Claudia

                  1 Reply Last reply Reply Quote 0
                  • Yaron
                    Yaron last edited by

                    Hello Claudia,

                    Thank you so much. I appreciate your time, patience and perseverance.
                    Best of luck.

                    Thanks also for the triple-click tip.

                    I wish you a Happy Easter and a nice weekend. :)

                    1 Reply Last reply Reply Quote 0
                    • Claudia Frank
                      Claudia Frank last edited by

                      Hello Yaron,

                      I guess you’ve heard about that prejudice that women are curious, haven’t you?
                      Well, sometimes this is good, especially for you at the moment ;-)

                      My easter egg for you is called …\scintilla\win32\ScintillaWin.cxx
                      and the line in question is 1370

                      	case WM_RBUTTONDOWN:
                      		::SetFocus(MainHWND());
                      		if (!PointInSelection(Point::FromLong(static_cast<long>(lParam)))) {
                      			CancelModes();
                      			// SetEmptySelection(PositionFromLocation(Point::FromLong(static_cast<long>(lParam))));
                      		}
                      		break;
                      

                      if commented, and scintilla has been rebuild your left/right-click works again.

                      Cheers
                      Claudia

                      1 Reply Last reply Reply Quote 0
                      • Yaron
                        Yaron last edited by

                        Hello Claudia,

                        The worse prejudice on my part is that in spite of your first name I assumed I was corresponding with a man.
                        Claudia, women of the world (unite!) - please forgive me.
                        From now on it’s Shirley Holmes!

                        Thank you so much for the delicious Easter Egg.
                        May I ask you to help me open it? :)

                        How do I rebuilt Scintilla?
                        Should I open SciLexer.vcxproj in scintilla\win32?
                        And then, rebuild NPP?

                        Best regards.

                        1 Reply Last reply Reply Quote 0
                        • Claudia Frank
                          Claudia Frank last edited by

                          Hi Yaron,

                          The worse prejudice on my part is that in spite of your first name I assumed I was
                          corresponding with a man.

                          ??? - I don’t get the meaning of it. Did you simply ignore my first name or did you
                          think I’m a man using a female name? Of course, you cannot be sure who your counterpart
                          is, it might be that even your husband is communicating with you and you don’t realize it ;-)

                          Claudia, women of the world (unite!) - please forgive me.

                          Why? Even if you thought I’m a man hidding its real name - how should you know.
                          There is nothing to forgive as you are always decent.

                          From now on it’s Shirley Holmes!

                          :-) - That’s really too much.

                          How do I rebuilt Scintilla?
                          Should I open SciLexer.vcxproj in scintilla\win32?

                          I always use nmake to built scintilla as described here.
                          You need to download boost, built the librarys and then built scintilla.
                          Of course, this commands need to be executed from within the developer command prompt.
                          (…Microsoft Visual Studio 12.0\Common7\Tools\Shortcuts…)

                          And then, rebuild NPP?

                          No, not needed. Just copy over the new created SciLexer.dll

                          Cheers Claudia

                          1 Reply Last reply Reply Quote 0
                          • Yaron
                            Yaron last edited by

                            Hello Claudia,

                            Thank you for your kind words and attitude.

                            Being a straight man, I’m spared the fear of unknowingly communicating with a husband.
                            Being a bachelor, I don’t have to worry about a wife either. :)
                            But this screen-to-screen world is indeed uncertain.
                            I did not ignore your first name; for a reason which undoubtedly deserves some further analysis, my assumption as to your gender was wrong. :)


                            Allow me to thank you again for your invaluable help.
                            May I ask it yet again?
                            As I probably won’t make any further changes in the Scintilla source code, would you be kind enough to upload the modified SciLexer.dll?
                            I’d be truly grateful.

                            Best regards.

                            1 Reply Last reply Reply Quote 0
                            • Claudia Frank
                              Claudia Frank last edited by

                              Hi Yaron,

                              file is here for the next 23 hours.

                              Cheers
                              Claudia

                              1 Reply Last reply Reply Quote 0
                              • Yaron
                                Yaron last edited by

                                Hello Claudia,

                                That’s a Faberge Easter egg!
                                Thank you so much. Your intelligence and kindness are unique.

                                Can you think of any possible downsides (i.e. functionalities which might break as a result of the change)?

                                Best regards.

                                1 Reply Last reply Reply Quote 0
                                • Claudia Frank
                                  Claudia Frank last edited by Claudia Frank

                                  Hi Yaron,

                                  Can you think of any possible downsides (i.e. functionalities which might break as a result of the change)?

                                  Hmmm, no, not really. The code is as follows

                                  	case WM_RBUTTONDOWN:
                                  		::SetFocus(MainHWND());
                                  		if (!PointInSelection(Point::FromLong(static_cast<long>(lParam)))) {
                                  			CancelModes();
                                  			// SetEmptySelection(PositionFromLocation(Point::FromLong(static_cast<long>(lParam))));
                                  		}
                                  		break;
                                  

                                  So the only thing we do is to prevent scintilla from calling SetEmptySelection,
                                  which itself does just some basic stuff like clearing selection and other related calls.

                                  You know, I’m a c++ noop so I might be wrong, but tbh, I would be very surprised if this change
                                  causes some problems.

                                  Cheers
                                  Claudia

                                  1 Reply Last reply Reply Quote 0
                                  • Yaron
                                    Yaron last edited by

                                    Hello Claudia,

                                    Great.
                                    Many thanks again. I do appreciate it.

                                    Best regards.

                                    1 Reply Last reply Reply Quote 0
                                    • First post
                                      Last post
                                    Copyright © 2014 NodeBB Forums | Contributors