Community
    • 登入

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

    已排程 已置頂 已鎖定 已移動 Help wanted · · · – – – · · ·
    17 貼文 2 Posters 8.3k 瀏覽
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Claudia FrankC
      Claudia Frank
      最後由 編輯

      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 條回覆 最後回覆 回覆 引用 0
      • Claudia FrankC
        Claudia Frank
        最後由 編輯

        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 條回覆 最後回覆 回覆 引用 0
        • YaronY
          Yaron
          最後由 編輯

          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 條回覆 最後回覆 回覆 引用 0
          • Claudia FrankC
            Claudia Frank
            最後由 編輯

            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 條回覆 最後回覆 回覆 引用 0
            • Claudia FrankC
              Claudia Frank
              最後由 編輯

              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 條回覆 最後回覆 回覆 引用 0
              • YaronY
                Yaron
                最後由 編輯

                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 條回覆 最後回覆 回覆 引用 0
                • Claudia FrankC
                  Claudia Frank
                  最後由 編輯

                  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 條回覆 最後回覆 回覆 引用 0
                  • YaronY
                    Yaron
                    最後由 編輯

                    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 條回覆 最後回覆 回覆 引用 0
                    • Claudia FrankC
                      Claudia Frank
                      最後由 編輯

                      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 條回覆 最後回覆 回覆 引用 0
                      • YaronY
                        Yaron
                        最後由 編輯

                        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 條回覆 最後回覆 回覆 引用 0
                        • Claudia FrankC
                          Claudia Frank
                          最後由 編輯

                          Hi Yaron,

                          file is here for the next 23 hours.

                          Cheers
                          Claudia

                          1 條回覆 最後回覆 回覆 引用 0
                          • YaronY
                            Yaron
                            最後由 編輯

                            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 條回覆 最後回覆 回覆 引用 0
                            • Claudia FrankC
                              Claudia Frank
                              最後由 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 條回覆 最後回覆 回覆 引用 0
                              • YaronY
                                Yaron
                                最後由 編輯

                                Hello Claudia,

                                Great.
                                Many thanks again. I do appreciate it.

                                Best regards.

                                1 條回覆 最後回覆 回覆 引用 0
                                • 第一個貼文
                                  最後的貼文
                                The Community of users of the Notepad++ text editor.
                                Powered by NodeBB | Contributors