PreviousNextTracker indexSee it online !

(26/212) 79 - Allow scrolling past end of text (EOT)

i.e. The ability to see virtual space beyond the end of
the text at the bottom of the file. The only limit, if
one is required, would be the last physical line of the
file must be visible.

Submitted jpotelle - 2006-10-19 21:18:06 Assigned
Priority 5 Labels
Status open Group None
Resolution None

Comments

2011-10-05 13:59:34
themanifold

Has there been any development on this feature in the last 4 years?

2011-10-05 15:51:13
jarekczek

Probably not. Personally I don't understand how would I benefit from seeing empty space below my text.

2011-10-05 16:06:05
themanifold

If there's a long piece of code, then I find myself looking down near the bottom of my screen. I have to do a physical resize of the window to make the line I'm currently editing (assuming it's at the bottom of the code) to make it appear in the centre of the screen. Either that or add my own whitespace to the bottom of the file...

When you're coding all day, it can get annoying.

2011-10-05 16:17:40
jarekczek

A workaround is very easy: put enters at the end of each of your files. From the other side there may be problems in implementation of this feature and I don't think everyone would like it. I'm coding much and never had a need of scrolling past the EOF. Neither have I problems in watching the bottom of the screen. My previous editor didn't allow scrolling below eof either.

Could someone answer whether there is a chance of accepting such a change? If not, close it.

2011-10-05 16:42:07
themanifold

It can be toggled on or off, just like electric scroll. It need not be permanent.

But yes, the enter key works. I'd just prefer not to add a couple of tens of enters in all my files. I guess having the code near the centre of the screen is a preference thing.

2011-10-06 08:18:05
jarekczek

A new option in "View" part: "allow scrolling past EOF". I'm not the one who can be sure, but there is a chance of getting acceptance of such a patch. I saw that there were such requests for other editors also (Kate, WingIde, Notepad++, Eclipse). A monitor in portrait mode is mentioned along with it.

So now you have to prepare a patch yourself, find someone to do it or just wait another X years until someone else does.

2011-10-06 10:24:55
themanifold

Alright. Well, I'll have to learn Java first. Thanks for talking about this.

2011-10-06 11:02:36
jarekczek

But I came up with a new idea. No new option. Configurable amount of electric scroll lines instead. Then if user opted for electric scroll he will be able to scroll this amount of lines past the EOF. Even more, it will be done automatically.

While the default for electric scroll is 3, it shouldn't harm anyone. But portrait programmers will be able to increase it to e.g. 10 making their job comfortable I guess.

Affected areas:
TextAreaOptionPane.java
jEdit.setIntegerProperty("view.electricBorders",electricBorders
.isSelected() ? 3 : 0);

TextArea.java, setFirstLine(int firstLine)
int max = displayManager.getScrollLineCount() - visibleLines
\+ (lastLinePartial ? 1 : 0);

Making a home hardcoded version of jedit with this feature seems to be a piece of cake.

And electric scroll amount can be set at runtime by
textArea.setElectricScroll(x)