Community
    • Login

    Scrolling

    Scheduled Pinned Locked Moved General Discussion
    12 Posts 5 Posters 3.1k 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.
    • nbonniereN
      nbonniere
      last edited by

      Is there a setting to enable scrolling when you cursor down that leaves 10 lines visible at all times except when there are less than 10 lines left, and vice-versa for cursoring up and scrolling leaving 10 lines at the top ?

      Michael VincentM 1 Reply Last reply Reply Quote 0
      • Michael VincentM
        Michael Vincent @nbonniere
        last edited by

        @nbonniere

        I don’t think so, but there is a Scintilla feature (caret slop) that does this. I have NppExec plugin installed and use it to run the following NppExec script at startup:

        NPP_CONSOLE keep
        SET LOCAL SLOP = 10
        
        IF "$(ARGC)"<="1" THEN
            SCI_SENDMSG SCI_SETYCARETPOLICY 13 $(SLOP)
        ELSE IF "$(ARGV[1])"~="on" THEN
            SCI_SENDMSG SCI_SETYCARETPOLICY 13 $(SLOP)
        ELSE IF "$(ARGV[1])"~="off" THEN
            SCI_SENDMSG SCI_SETYCARETPOLICY 8 0
        ELSE
            SCI_SENDMSG SCI_SETYCARETPOLICY 13 $(ARGV[1])
        ENDIF
        
        

        NOTE: I don’t use 10 lines so my line is: SET LOCAL SLOP = 5.

        I’m sure your favorite scripting plugin could also handle this.

        Cheers.

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

          I don’t understand what this means. :-(

          1 Reply Last reply Reply Quote 0
          • PeterJonesP
            PeterJones
            last edited by PeterJones

            example:

            (I had never heard of such a thing, and had guessed it wasn’t possible; so I was surprised that @Michael-Vincent readily knew how to do it.)

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

              Thanks Peter. I understand it now. It is rather hard to put into words what it does, it seems. I could see it as a device to keep the (vertical) caret in the middle of the “viewport”, presuming that one always uses the same vertical size viewport and an appropriate setting for this parameter (i.e., half the viewport size).

              1 Reply Last reply Reply Quote 1
              • PeterJonesP
                PeterJones
                last edited by PeterJones

                Yeah, the scintilla doc that @Michael-Vincent mentioned says,

                By keeping the caret away from the edges, it is seen within its context. This makes it likely that the identifier that the caret is on can be completely seen, and that the current line is seen with some of the lines following it, which are often dependent on that line.

                That seems a reasonable justification for enabling that feature. I’m not likely to switch to using it… but I can at least see why some people would find it useful.

                Michael VincentM 1 Reply Last reply Reply Quote 2
                • Michael VincentM
                  Michael Vincent @PeterJones
                  last edited by

                  @PeterJones
                  That’s exactly why I use it with just 5. Enough lines to get some context.

                  Cheers.

                  1 Reply Last reply Reply Quote 2
                  • guy038G
                    guy038
                    last edited by guy038

                    Hi, @nbonniere, @michael-vincent, @alan-kilborn, @peterjones and All,

                    From your posts, I just decided to investigate about these notions, especially the different kinds of vertical scrolling Y, allowed in N++ ;-))


                    I first tried to assimilate the SCI_SETYCARETPOLICY Scintilla message from :

                    https://www.scintilla.org/ScintillaDoc.html#SCI_SETYCARETPOLICY

                    Unfortunately, the columns of the table are wrongly displayed. Indeed, from the file ...\scintilla\include\Scintilla.h, we learn that the values of the 4 flags are :

                    ...
                    #define CARET_SLOP 0x01
                    #define CARET_STRICT 0x04
                    #define CARET_JUMPS 0x10
                    #define CARET_EVEN 0x08
                    ...
                    

                    So, to my mind, in order to get the correct value of caretYPolicy, which is a combination of CARET_SLOP, CARET_STRICT, CARET_JUMPS and CARET_EVEN flags, the right order, by decreasing weights, should be :

                    CARET_JUMPS (16) - CARET_EVEN (8) - CARET_STRICT (4) - CARET_SLOP (1)

                    Now, from the file ...\scintilla\src\Editor.cxx

                        ...
                    	caretXPolicy = CARET_SLOP | CARET_EVEN;
                    	caretXSlop = 50;
                    
                    	caretYPolicy = CARET_EVEN;
                    	caretYSlop = 0;
                    
                    	visiblePolicy = 0;
                    	visibleSlop = 0;
                        ...
                    

                    We can deduce that the default N++ caretYPolicy is CARET_EVEN, with a NULL caretSlop value

                    On the other hand, in the ...\scintilla\include\Scintilla.h file, we have the line :

                    ...
                    #define SCI_SETYCARETPOLICY 2403	
                    ...
                    

                    Now, everything is clear ;-)) To study the N++ caretYPolicy we just need to :

                    • Use, for instance, the NppExec plugin

                    • Execute the command SCI_SENDMSG SCI_SETYCARETPOLICY caretYPolicy caretYSlop ( or SCI_SENDMSG 2403 caretYPolicy caretYSlop ), where :

                      • caretYPolicy is a combination of the 4 flags, with value between 0 and 29

                      • caretYSlop represents the number of lines of the unwanted zone UZ where the caret is… unwanted !

                    Remarks :

                    • From above, to restore the default N++ caretPolicy, simply use the command SCI_SENDMSG SCI_SETYCARETPOLICY 8 0

                    • When the CARET_SLOP flag is not set (0), obviously, the caretYSlop value can be any

                    • When the CARET_SLOP flag is set (Y), I chose the caretYSlop value of 5 lines, during the test phase

                    • In order to easily test the different possibilities :

                      • Notepad++ must have a single row of tabs

                      • Use the Courier New font, with size 10 ( Settings > Style Configurator... > Global Styles > Default Style > Font Style )

                      • Use the default zoom ( Ctrl + / )

                      • Disable the Word wrap feature ( View > Word wrap )

                      • Create a Test.txt file containing, at least, 300 lines, from Line 001 to Line 300

                    Notes :

                    • With some caretYPolicy tested, it may be difficult to get the caret on the first / last visible line ! If so, use, first, the mouse wheel or the vertical scroll bar to move the line, containing the caret, at the very beginning / end of the text window, before pressing the Up / Down keys or clicking on the left mouse button to see the effects of the current policy :-))

                    Here are, below, in two tables, the different results of my searches. Unfortunately, due to the 16,384 bytes maximum post size, each table is posted, separately !

                    Best Regards,

                    guy038

                    1 Reply Last reply Reply Quote 2
                    • guy038G
                      guy038
                      last edited by

                      Hi, All,

                      Here is the first table, relative to the caretYPolicy, when caretYSlop value is not used :

                        =====================================================================
                        ║  JUMPS  |   EVEN  |  STRICT |   SLOP  ║ caretYPolicy ║ caretYSlop ║
                        ║---------•---------•---------•---------║              ║            ║
                        ║    16   |    8    |    4    |    1    ║     Total    ║  UZ Width  ║
                        ==========•=========•=========•=========•==============•============•==============================================================================================================
                        ║         |         |         |         ║              ║            ║  By pressing the DOWN key, with the CARET on the LAST VISIBLE line N,                                       ║
                        ║         |         |         |         ║              ║            ║  this line N becomes the new FIRST VISIBLE line, with the CARET inside                                      ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  By pressing the UP key, with the CARET on the FIRST VISIBLE line N, the                                    ║
                        ║     0   |    0    |    0    |    0    ║       0      ║      -     ║  PREVIOUS line N-1 becomes the new FIRST VISIBLE line, with the CARET inside          ( DEFAULT behavior )  ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  By a SINGLE LEFT mouse CLICK, on the LAST VISIBLE line N, this                                             ║
                        ║         |         |         |         ║              ║            ║  line becomes the new FIRST VISIBLE line, with the CARET inside                                             ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║     1   |    0    |    0    |    0    ║      16      ║      -     ║  If a SINGLE LEFT mouse CLICK, on the FIRST VISIBLE line N, NO action occurs          ( DEFAULT behavior )  ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the DOWN or UP keys, the CARET lies                                            ║
                        ║         |         |         |         ║              ║            ║  between the TOP of the window and the PENULTIMATE VISIBLE line                                             ║
                        ║---------•---------•---------•---------•--------------•------------•-------------------------------------------------------------------------------------------------------------║
                        ║         |         |         |         ║              ║            ║  By pressing the DOWN key, with the CARET on the LAST VISIBLE line N, the NEXT                              ║
                        ║         |         |         |         ║              ║            ║  line N+1 becomes the new PENULTIMATE VISIBLE line, with the CARET inside             ( DEFAULT behavior )  ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  By pressing the UP key, with the CARET on the FIRST VISIBLE line N, the                                    ║
                        ║         |         |         |         ║              ║            ║  PREVIOUS line N-1 becomes the new FIRST VISIBLE line, with the CARET inside          ( DEFAULT behavior )  ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║     0   |    1    |    0    |     0   ║       8      ║      -     ║  By a SINGLE LEFT mouse CLICK, on the LAST VISIBLE line N, this line                                        ║
                        ║         |         |         |         ║              ║            ║  becomes the new PENULTIMATE VISIBLE line N-1, with the CARET inside                  ( DEFAULT behavior )  ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  If a SINGLE LEFT mouse CLICK, on the FIRST VISIBLE line N, NO action occurs          ( DEFAULT behavior )  ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the DOWN or UP keys, the CARET lies                                            ║
                        ║         |         |         |         ║              ║            ║  between the TOP of the window and the PENULTIMATE VISIBLE line                                             ║
                        ║---------•---------•---------•---------•--------------•------------•-------------------------------------------------------------------------------------------------------------║
                        ║         |         |         |         ║              ║            ║  By pressing the DOWN key, with the CARET on the LAST VISIBLE line N, the NEXT                              ║
                        ║         |         |         |         ║              ║            ║  line N+1 becomes the new MIDDLE line of the window, with the CARET inside                                  ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  By pressing the UP key, with the CARET on the FIRST VISIBLE line N, the                                    ║
                        ║         |         |         |         ║              ║            ║  PREVIOUS line N-1 becomes the new MIDDLE line of the window, with the CARET inside                         ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  By a SINGLE LEFT mouse CLICK, on the LAST VISIBLE line N, this line                                        ║
                        ║     1   |    1    |    0    |    0    ║      24      ║      -     ║  becomes the new MIDDLE line of the window, with the CARET inside                                           ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  If a SINGLE LEFT mouse CLICK, on the FIRST VISIBLE line N, NO action occurs          ( DEFAULT behavior )  ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the UP key, the CARET lies between the TOP and the MIDDLE of the window        ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the DOWN key, the CARET lies between the MIDDLE and the END of the window      ║
                        ║---------•---------•---------•---------•--------------•------------•-------------------------------------------------------------------------------------------------------------║
                        ║         |         |         |         ║              ║            ║  By pressing the DOWN key, with the CARET on the LAST VISIBLE line N,                                       ║
                        ║         |         |         |         ║              ║            ║  the NEXT line N+1 becomes the new FIRST VISIBLE line, with the CARET inside                                ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║     0   |    0    |    1    |    0    ║       4      ║      -     ║  By pressing the UP key, with the CARET on the FIRST VISIBLE line N, the                                    ║
                        ║         |         |         |         ║              ║            ║  PREVIOUS line N-1 becomes the new FIRST VISIBLE line, with the CARET inside          ( DEFAULT behavior )  ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  By a SINGLE LEFT mouse CLICK, on ANY VISIBLE line Y, this line Y                                           ║
                        ║     1   |    0    |    1    |    0    ║      20      ║      -     ║  becomes the new FIRST VISIBLE line, with the CARET inside                                                  ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the DOWN or UP keys, the CARET remains on the FISRT VISIBLE line               ║
                        ║---------•---------•---------•---------•--------------•------------•-------------------------------------------------------------------------------------------------------------║
                        ║         |         |         |         ║              ║            ║  By pressing the DOWN key, with the CARET on the LAST VISIBLE line N,                                       ║
                        ║         |         |         |         ║              ║            ║  the NEXT line N+1 becomes the new MIDDLE line, with the CARET inside                                       ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║     0   |    1    |    1    |    0    ║      12      ║      -     ║  By pressing the UP key, with the CARET on the FIRST VISIBLE line N,                                        ║
                        ║         |         |         |         ║              ║            ║  the PREVIOUS line N-1 becomes the new MIDDLE line, with the CARET inside                                   ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  By a SINGLE LEFT mouse CLICK, on ANY VISIBLE line N, this                                                  ║
                        ║     1   |    1    |    1    |    0    ║      28      ║      -     ║  line N becomes the new MIDDLE line, with the CARET inside                                                  ║
                        ║         |         |         |         ║              ║            ║                                                                                                             ║
                        ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the DOWN or UP keys, the CARET remains on the MIDDLE line                      ║
                        ===================================================================================================================================================================================
                      

                      Cheers,

                      guy038

                      1 Reply Last reply Reply Quote 2
                      • guy038G
                        guy038
                        last edited by

                        Hi, All,

                        Again, I need to split this second table, relative to the caretYPolicy when caretYSlop value Y is used, in two parts :-(

                          =====================================================================
                          ║  JUMPS  |   EVEN  |  STRICT |   SLOP  ║ caretYPolicy ║ caretYSlop ║
                          ║---------•---------•---------•---------║              ║            ║
                          ║    16   |    8    |    4    |    1    ║     Total    ║  UZ Width  ║
                          ║=========•=========•=========•=========•==============•============•==============================================================================================================
                          ║         |         |         |         ║              ║            ║  By pressing the DOWN key, with the CARET on the LAST VISIBLE line N, the NEXT                              ║
                          ║         |         |         |         ║              ║            ║  line N+1 becomes the Y+1_th VISIBLE line, from the TOP, with the CARET inside                              ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  By pressing the UP key, with the CARET on the FIRST VISIBLE line N, the PREVIOUS                           ║
                          ║         |         |         |         ║              ║            ║  line N-1 becomes the Y+1_th VISIBLE line, from the TOP, with the CARET inside                              ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  By a SINGLE LEFT mouse CLICK, on the LAST VISIBLE line N, this line                                        ║
                          ║     0   |    0    |    0    |    1    ║       1      ║      Y     ║  becomes the Y+1_th VISIBLE line, from the TOP, with the CARET inside                                       ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  If a SINGLE LEFT mouse CLICK, on the FIRST VISIBLE line N, NO action occurs          ( DEFAULT behavior )  ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║                                                                                                           ║
                          ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the UP key, the CARET lies between the TOP and the Y+1_th line from the TOP    ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║                                                                                                           ║
                          ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the DOWN key, the CARET lies between the Y+1_th line from the TOP and the END  ║
                          ║---------•---------•---------•---------•--------------•------------•-------------------------------------------------------------------------------------------------------------║
                          ║         |         |         |         ║              ║            ║  By pressing the DOWN key, with the CARET on the LAST VISIBLE line N, the NEXT                              ║
                          ║         |         |         |         ║              ║            ║  line N+1 becomes the 3Y+1_th VISIBLE line, from the TOP, with the CARET inside                             ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  By pressing the UP key, with the CARET on the FIRST VISIBLE line N, the PREVIOUS                           ║
                          ║         |         |         |         ║              ║            ║  line N-1 becomes the 3Y+1_th VISIBLE line, from the TOP, with the CARET inside                             ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  By a SINGLE LEFT mouse CLICK, on the LAST VISIBLE line N, this line                                        ║
                          ║     1   |    0    |    0    |    1    ║      17      ║      Y     ║  becomes the 3Y+1_th VISIBLE line, from the TOP, with the CARET inside                                      ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  If a SINGLE LEFT mouse CLICK, on the FIRST VISIBLE line N, NO action occurs          ( DEFAULT behavior )  ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the UP key, the CARET lies between the TOP and the 3Y+1_th line from the TOP   ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the DOWN key, the CARET lies between the 3Y+1_th line from the TOP and the END ║
                          ║---------•---------•---------•---------•--------------•------------•-------------------------------------------------------------------------------------------------------------║
                          ║         |         |         |         ║              ║            ║  By pressing the DOWN key, with the CARET on the LAST VISIBLE line N, the NEXT                              ║
                          ║         |         |         |         ║              ║            ║  line N+1 becomes the Y+2_th VISIBLE line, from the END, with the CARET inside                              ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  By pressing the UP key, with the CARET on the FIRST VISIBLE line N, the PREVIOUS                           ║
                          ║         |         |         |         ║              ║            ║  line N-1 becomes the Y+1_th VISIBLE line, from the TOP, with the CARET inside                              ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  By a SINGLE LEFT mouse CLICK, on the LAST VISIBLE line N, the NEXT line N+1                                ║
                          ║     0   |    1    |    0    |    1    ║       9      ║      Y     ║  becomes the Y+1_th VISIBLE line, from the END, with the CARET inside the OLD line N                        ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  If a SINGLE LEFT mouse CLICK, on the FIRST VISIBLE line N, NO action occurs          ( DEFAULT behavior )  ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the UP key, the CARET lies between the TOP and the Y+1_th line from the TOP    ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the DOWN key, the CARET lies between the Y+2_th line from the END and the END  ║
                          ║---------•---------•---------•---------•--------------•------------•-------------------------------------------------------------------------------------------------------------║
                          ║         |         |         |         ║              ║            ║  By pressing the DOWN key, with the CARET on the LAST VISIBLE line N, the NEXT                              ║
                          ║         |         |         |         ║              ║            ║  line N+1 becomes the 3Y+2_th VISIBLE line, from the END, with the CARET inside                             ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  By pressing the UP key, with the CARET on the FIRST VISIBLE line N, the PREVIOUS                           ║
                          ║         |         |         |         ║              ║            ║  line N-1 becomes the 3Y+1_th VISIBLE line, from the TOP, with the CARET inside                             ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  By a SINGLE LEFT mouse CLICK, on the LAST VISIBLE line N, the NEXT line N+1                                ║
                          ║     1   |    1    |    0    |    1    ║      25      ║      Y     ║  becomes the 3Y+1_th VISIBLE line, from the END, with the CARET inside the OLD line N                       ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  If a SINGLE LEFT mouse CLICK, on the FIRST VISIBLE line N, NO action occurs          ( DEFAULT behavior )  ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the UP key, the CARET lies between the TOP and the 3Y+1_th line from the TOP   ║
                          ║         |         |         |         ║              ║            ║                                                                                                             ║
                          ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the DOWN key, the CARET lies between the 3Y+2_th line from the END and the END ║
                          ===================================================================================================================================================================================
                        

                        Cheers,

                        Guy

                        1 Reply Last reply Reply Quote 2
                        • guy038G
                          guy038
                          last edited by

                          Hi, All,

                          And here is the last part, relative to the caretYPolicy, when caretYSlop value Y is used :

                            =====================================================================
                            ║  JUMPS  |   EVEN  |  STRICT |   SLOP  ║ caretYPolicy ║ caretYSlop ║
                            ║---------•---------•---------•---------║              ║            ║
                            ║    16   |    8    |    4    |    1    ║     Total    ║  UZ Width  ║
                            ==========•=========•=========•=========•==============•============•==============================================================================================================
                            ║         |         |         |         ║              ║            ║  By pressing the DOWN key, with the CARET on the LAST VISIBLE line N, the NEXT                              ║
                            ║         |         |         |         ║              ║            ║  line N+1 becomes the Y+1_th VISIBLE line, from the TOP, with the CARET inside                              ║
                            ║         |         |         |         ║              ║            ║                                                                                                             ║
                            ║     0   |    0    |    1    |    1    ║       5      ║      Y     ║  By pressing the UP key, with the CARET on the FIRST VISIBLE line N, the PREVIOUS                           ║
                            ║         |         |         |         ║              ║            ║  line N-1 becomes the Y+1_th VISIBLE line, from the TOP, with the CARET inside                              ║
                            ║         |         |         |         ║              ║            ║                                                                                                             ║
                            ║         |         |         |         ║              ║            ║  By a SINGLE LEFT mouse CLICK, on the LAST VISIBLE line N, this                                             ║
                            ║         |         |         |         ║              ║            ║  line becomes the new FIRST VISIBLE line, with the CARET inside                                             ║
                            ║     1   |    0    |    1    |    1    ║      21      ║      Y     ║                                                                                                             ║
                            ║         |         |         |         ║              ║            ║  If a SINGLE LEFT mouse CLICK, on the FIRST VISIBLE line N, NO action occurs          ( DEFAULT behavior )  ║
                            ║         |         |         |         ║              ║            ║                                                                                                             ║
                            ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the DOWN or UP keys, the CARET remains on the Y+1_th line, from the TOP        ║
                            ║---------•---------•---------•---------•--------------•------------•-------------------------------------------------------------------------------------------------------------║
                            ║         |         |         |         ║              ║            ║  By pressing the DOWN key, with the CARET on the LAST VISIBLE line N, the NEXT                              ║
                            ║         |         |         |         ║              ║            ║  line N+1 becomes the Y+2_th VISIBLE line, from the END, with the CARET inside                              ║
                            ║         |         |         |         ║              ║            ║                                                                                                             ║
                            ║         |         |         |         ║              ║            ║  By pressing the UP key, with the CARET on the FIRST VISIBLE line N, the PREVIOUS                           ║
                            ║         |         |         |         ║              ║            ║  line N-1 becomes the Y+1_th VISIBLE line, from the TOP, with the CARET inside                              ║
                            ║         |         |         |         ║              ║            ║                                                                                                             ║
                            ║         |         |         |         ║              ║            ║  By a SINGLE LEFT mouse CLICK, on the LAST VISIBLE line N, this line                                        ║
                            ║     0   |    1    |    1    |    1    ║      13      ║      Y     ║  becomes the new PENULTIMATE VISIBLE line N-1, with the CARET inside                  ( DEFAULT behavior )  ║
                            ║         |         |         |         ║              ║            ║                                                                                                             ║
                            ║         |         |         |         ║              ║            ║  If a SINGLE LEFT mouse CLICK, on the FIRST VISIBLE line N, NO action occurs          ( DEFAULT behavior )  ║
                            ║         |         |         |         ║              ║            ║                                                                                                             ║
                            ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the DOWN or UP keys, the CARET lies between                                    ║
                            ║         |         |         |         ║              ║            ║  the Y+1_th line, from the TOP, and the Y+2_th line, from the END                                           ║
                            ║---------•---------•---------•---------•--------------•------------•-------------------------------------------------------------------------------------------------------------║
                            ║         |         |         |         ║              ║            ║  By pressing the DOWN key, with the CARET on the LAST VISIBLE line N, the NEXT                              ║
                            ║         |         |         |         ║              ║            ║  line N+1 becomes the 3Y+2_th VISIBLE line, from the END, with the CARET inside                             ║
                            ║         |         |         |         ║              ║            ║                                                                                                             ║
                            ║         |         |         |         ║              ║            ║  By pressing the UP key, with the CARET on the FIRST VISIBLE line N, this line                              ║
                            ║         |         |         |         ║              ║            ║  becomes the 3Y+1_th VISIBLE line, from the TOP, with the CARET inside                                      ║
                            ║         |         |         |         ║              ║            ║                                                                                                             ║
                            ║     1   |    1    |    1    |    1    ║      29      ║      Y     ║  By a SINGLE LEFT mouse CLICK, on the LAST VISIBLE line N, this line                                        ║
                            ║         |         |         |         ║              ║            ║  becomes the 3Y+2_th VISIBLE line, from the END, with the CARET inside                                      ║
                            ║         |         |         |         ║              ║            ║                                                                                                             ║
                            ║         |         |         |         ║              ║            ║  If a SINGLE LEFT mouse CLICK, on the FIRST VISIBLE line N, NO action occurs          ( DEFAULT behavior )  ║
                            ║         |         |         |         ║              ║            ║                                                                                                             ║
                            ║         |         |         |         ║              ║            ║  When pressing REPEATEDLY on the DOWN or UP keys, the CARET lies between                                    ║
                            ║         |         |         |         ║              ║            ║  the Y+1_th line, from the TOP, and the Y+2_th line, from the END                                           ║
                            ===================================================================================================================================================================================
                          

                          Note the caret management, defined with caretYPolicy = 12. A bit weird !

                          I just hope, that it’ll useful to someone ;-))

                          Best Regards,

                          guy038

                          Michael VincentM 1 Reply Last reply Reply Quote 2
                          • Michael VincentM
                            Michael Vincent @guy038
                            last edited by

                            @guy038
                            Thanks! I should have mentioned that I figured the table was wrong also and had to experiment to get my script to work. I didn’t document like you did though … Bravo!

                            Cheers.

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