Community
    • Login

    Can't change Scintilla LineUp/Down Rect Extend to require CTRL key

    Scheduled Pinned Locked Moved General Discussion
    9 Posts 3 Posters 265 Views
    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.
    • M
      madmrmax
      last edited by

      So in N++ 8.7.1 I’m trying to change it such that rectangle line extend up and down requires both the Ctrl+Alt + Shift key + Up/Down (vs. the default of Alt+Shift+Up/Down).

      All seems good when going to the shortcut editor on the Scintilla tab, I can find sci_LineDownRectExnted and sci_LineUpRectExtend. I can modify them add the Ctrl modifier and apply.

      BUT when I actually go and try to use it rectangle extend, it only works the first time – you can’t extend more than two lines using the keyboard.

      Is it a bug that you can’t extend more than one time using custom Scintilla RectExtendUp/Down?

      thanks

      Terry RT 1 Reply Last reply Reply Quote 0
      • Terry RT
        Terry R @madmrmax
        last edited by Terry R

        @madmrmax said in Can't change Scintilla LineUp/Down Rect Extend to require CTRL key:

        Is it a bug that you can’t extend more than one time using custom Scintilla RectExtendUp/Down?

        Very possibly. I’m on 8.7.8 and can confirm the default shortcut allows for multiple lines (more than 2) to be selected. once I add the “Ctrl” key to the shortcut it only allows for 2 lines to be selected. And as soon as I want the 3rd line the area moves down to retain the 2 lines only.

        Unfortunately as this is a Scintilla command it may well be a bug in that, rather then Notepad++. Scintilla has it’s own bug listing forum. I don’t know the exact link at the moment.

        Terry

        PS as it may take some time for that to be resolved you’ll have to stay with the default shortcut mapping to get what you want.

        M 1 Reply Last reply Reply Quote 0
        • M
          madmrmax @Terry R
          last edited by

          @Terry-R Thanks. I got the Sourceforge Scintilla project and I can open a ticket/bug. I don’t know how “friendly” they are to bugs which repro in N++ vs. if they require a bug repro somewhere else.

          I’ll give it a shot though.

          Thanks again for the reply!
          -mr

          Terry RT 1 Reply Last reply Reply Quote 0
          • Terry RT
            Terry R @madmrmax
            last edited by

            @madmrmax

            You can but try. They can just say that it’s not present in Scintilla and it’s the Notepad++ interface causing it. And there is no harm in putting in a bug ticket, although I’d try checking their existing bugs to make sure no one has already located this issue and there is a answer from Scintilla on any outcome to it.

            Terry

            M 1 Reply Last reply Reply Quote 0
            • M
              madmrmax @Terry R
              last edited by

              @Terry-R Ok I’ve posted the bug in Scintilla as well as got a “not repro” in the Scintilla SciTE.

              https://sourceforge.net/p/scintilla/bugs/2473/

              So it does look like a potential issue with the interactions between N++ and Scintilla.

              I noticed that N++ has its own editor command for move lines up or down and it doesn’t list (or use?) Scintilla’s version of those commands. Perhaps that is the issue.

              -mr

              Terry RT Alan KilbornA 2 Replies Last reply Reply Quote 0
              • Terry RT
                Terry R @madmrmax
                last edited by

                @madmrmax

                There are some “heavy” users of NPP here, so give it some time for them to respond. They might have either a workaround, or idea that it is indeed a problem with the NPP/Scintilla interface.

                There is a FAQ post that outlines how to post a NPP bug, but first get some feedback from other users. I’m only 1 person who has tested and can replicate it.

                Terry

                1 Reply Last reply Reply Quote 0
                • Alan KilbornA
                  Alan Kilborn @madmrmax
                  last edited by

                  @madmrmax said :

                  I noticed that N++ has its own editor command for move lines up or down

                  This seems irrelevant to the original problem description. Moving lines up or down isn’t related to extending a selection.


                  …try to use it rectangle extend, it only works the first time – you can’t extend more than two lines using the keyboard.

                  This actually sounds familiar, like it has been discussed before…


                  Ok, so there’s the Shortcut Mapper…

                  Then there’s also the concept that a user would never (!) change a common keycombo to be something else (gasp!). For a wild example, consider a user wanting to change Ctrl+c to not be “copy” (heresy!).

                  Most often, Notepad++ developers respect what is set by the Shortcut Mapper … but sometimes they disregard it and process hard-coded keycombos. I know, it sounds like a bad thing to do (and it is), but…the devs did it.

                  So for some “bad” stuff, have a look at the ScintillaEditView.cpp file in the Notepad++ source code repo. Search it for VK_ and you’ll see that it hard-processes some keys. Ideally, it would first use indirection to see what the user really has mapped, before doing what it’s going to.

                  It appears the offending code in this case has to do with column2MultSelect. If the code that processes this variable is removed (i.e., commented out), and Notepad++ is rebuilt and run, all seems to work fine with Ctrl+Shift+Alt+arrows used rather than Shift+Alt+arrows.

                  Given that we now know what to look for (we have insight!), we can see that uncheckmarking this setting will allow Ctrl+Shift+Alt+arrows to work:

                  3cded9ca-bce7-4a8f-8176-27e01f2e29c8-image.png

                  M 1 Reply Last reply Reply Quote 7
                  • M
                    madmrmax @Alan Kilborn
                    last edited by

                    @Alan-Kilborn
                    Awesome! That worked great and thank you! I don’t know what I’m losing out on by unchecking “Enable Column Selection to Multi-Editing” but that is for a future me problem. I’m happy I can provide this update to my team.

                    -mr

                    Alan KilbornA 1 Reply Last reply Reply Quote 1
                    • Alan KilbornA
                      Alan Kilborn @madmrmax
                      last edited by

                      @madmrmax said:

                      I don’t know what I’m losing out on by unchecking “Enable Column Selection to Multi-Editing”

                      IMO, you’re not losing out on much; it’s a lame feature (that some feel is important, to be fair).

                      But if you really want to know, read HERE.

                      1 Reply Last reply Reply Quote 2
                      • First post
                        Last post
                      The Community of users of the Notepad++ text editor.
                      Powered by NodeBB | Contributors