Menu

Where is the Dynamic Horizontal scrollbar?

Sing
2009-07-04
2012-11-13
  • Sing

    Sing - 2009-07-04

    I remember that in some of the previous version of Notepad++, the Horizontal scrollbar will dynamically resize when not in wrap mode.
    But in the current version, the Horizontal scrollbar will not resize again once it reached the longest line of the document. Its very annoyance  that if most lines of the  document fit into the view and  only few characters are out of view, but few lines are very long, after the Horizontal scrollbar reached the longest line, and you go to the area thats only get few characters are out of view , you may need to scroll that small Horzontal scrollbar  looking for where is the end of that area.

    Why use this kind of behaviour? Or, can the real Dynamic Horzontal scrollbar be an option, so that I can enable it?

     
    • cchris

      cchris - 2009-07-11

      That means that whenever you move one line up or down, the thumb may wildly change. I don't know about performance, but it would be very distracting.

      See my IdeaToorrent solution with provisions for smoothing up thumb size changes. I can believe that, when scrolling text fast, the tracking should be disabled anyway - isn't it?

      CChris

       
    • cchris

      cchris - 2009-07-04

      Actualy it is an option. Insert the following macro in shortcuts.xml to disable this behaviour:

              <Macro name="dontTrackLongest" Ctrl="yes" Alt="yes" Shift="no" Key="100">
                  <Action type="0" message="2516" wParam="0" lParam="0" sParam="" />
              </Macro>

      Replace "wParam="0" " with "wParam="1" " to enable back. Since macros dont take parameters, you'll need a second macro for that.

      CChris

       
      • Sing

        Sing - 2009-07-06

        I am using Notepad+ 5.3. Just tried what you posted, but it doesn't work. Does 5.3 have this function?

         
    • cchris

      cchris - 2009-07-06

      I can't remember exactly , but it is possible that 5.3 (or rather Scintilla 1.74) doesn't support it. Try upgrading to 5.4.4 and doing it again. Does the macro show on your Macro menu? If so, then it's only a version issue.

      CChris

       
      • Sing

        Sing - 2009-07-06

        Just tried 5.4.4, but still don't work.
        It does show on the Macro menu, I also clicked on it, but nothing happen and nothing change.

         
    • cchris

      cchris - 2009-07-07

      What the macro does is to prevent computing the maximal range again if a still longer line is shown. Firing the macro won't resize the thumb.

      I'd try this (not tested):
      1/ at the end of your document wth long lines, add a screenful of blank lines, so as to scroll up any actual text.
      2/ Close Notepad++
      3/ Reopen. Normally, you should only see those blank lines you added
      4/ Fire the macro
      5/ Now remove the bllank lines. This may scroll the long line into view, and thumb should not change.

      CChris

       
      • Sing

        Sing - 2009-07-07

        What I want is just like the Eclipse IDE, it will resize the horizontal scrollbar each time after scrolling the vertical scrollbar, but Notepad++ just stop to resize after it find the longest line in a document.
        But you said "prevent computing the maximal range again if a still longer line is shown", that means its the default behaviour of current version of Notepad++ (stop to resize after it find the longest line), right? Then, why I need this macro?

         
    • cchris

      cchris - 2009-07-07

      Nope.
      The default behaviour is: if a line is displayed that is even longer than the maximal scrolled width for current document, then the width is increased.
      Firing the macro disables this feature. It doesn't shorten the max scrolled width. And the latter is stored in the session file.

      So, instead of the solution above, you can:
      1/ Open document
      2/ Cut all contents
      3/ Close Notepad++
      4/ Reopen.
      5/ Fire macro
      6/ Paste contents back.

      Better?

      CChris

       
      • Sing

        Sing - 2009-07-08

        Tried what you said. But, not work. It just became worse. The Horizontal scrollbar do not auto resize, I need to use right arrow to get the scrollbar change for the long line.

        What I said about the previous version of Notepad++ that got the behavior I want is, it will shrink and expand the horizontal scrollbar according to the current displayed lines. But the current version only shrink the with of the scrollbar.

         
    • cchris

      cchris - 2009-07-08

      Then you probably should file a bug report, specially if you can figure out an earlier version number with the behaviour you report being lost.
      Noe that, if this is a deliberate change in Scintilla, there is not much that can be done about it, except checking the Scintilla project on Sourceforge.

      CChris

       
      • Sing

        Sing - 2009-07-10

        Just found that, the version get the behavior I want is 4.7.5.

         
    • cchris

      cchris - 2009-07-10

      Any developer comment on this? Is this a Scintilla design change?

      CChris

       
      • Don HO

        Don HO - 2009-07-10

        If my memory is good, it's due to performance issue that this behaviour was changed.

        Don

         
        • Sing

          Sing - 2009-07-11

          how bad is the performance of the original behavior? It just change the scroll bar's width for the currently displayed lines. I can't imagine how it can affect the performance.

           
MongoDB Logo MongoDB