Reset horizontal scroll bar width in Notepad++

notepadscrolling

I have a document open in Notepad++, and for some reason the horizontal scrollbar is tiny. It looks like the width of the text area is over 7000 characters. The document does have a (single) long line, about 1000 characters long, but it's of course much smaller than the area reserved for it.

Is there a way to reset the horizontal size in Notepad++? It's a pain to scroll with a bar so small, especially since the used area is only 10-20% of the total.

Best Answer

This is not possible.

Notepad++ uses the Scintilla editor component which doesn't provide this feature. Yes, it will increase the horizontal scroll range but it won't reduce it.

Here's the relevant part from the documentation (emphasis mine):

If scroll width tracking is enabled then the scroll width is adjusted to ensure that all of the lines currently displayed can be completely scrolled. This mode never adjusts the scroll width to be narrower.

Scintilla developer Neil Hodgson has repeatedly said that this feature will not be implemented due to the performance cost of dynamically determining the current widest line.

If your longest line is about 1000 characters but your scrolling range is greater, you can always close and re-open the file to reset the range to your longest line.

Related Question