Change scroll height from init script


Is there a way to change the scroll height of the editor from my init script? I’ve looked through docs and source code but I can’t seem to find a way.

Essentially I am trying to recreate the “Scroll Past End” setting but change how much space is allowed at the bottom, e.g. I want to only have 10 extra blank lines at the bottom instead of being able to scroll so far down that only 3 lines of code are showing.

Any help would be much appreciated.