I've got an old IBM 3161 ASCII terminal, and a problem.
That problem is not using an old ASCII terminal from the 80s.
I run Debian Sid and Joe 3.7.
JOE scrolling is painfully slow when you pass the last column of the display, because it tries to redraw the entire screen. At 19200 baud (the highest speed my terminal supports) this is painful to watch. This also happens in jpico. In nano, at least, only the current line scrolls, and it scrolls in a large jump many characters forward. I would like an option in JOE to allow for a similar, more serial terminal-friendly scrolling method, either scrolling in a huge jump, or scrolling only the current line, or both.
Here is a very short video that shows what I mean. The whining is because of a bad capacitor in my monitor, I'm working on it. Also, the battery in my camera died as I was saying my last sentence. I said something along the lines of "I'd like an option to only scroll the line currently being edited or else to scroll all the text in a large jump like nano."
https://www.youtube.com/watch?v=NOwN4O9BlfQ
JOE used to attempt to use character insert / delete commands, but you are probably right that jump scrolling is a better solution. The code to do this is easy, modify bw.c:
Find the line / Adjust column /, and then the line 'w->offset = w->cursor->xcol - (w->w - 1);'.
Change this to 'w->offset = w->cursor->xcol - w->w/2;'
You can see that when you scroll left, it jumps by 5 columns. The code to control this is just above.
BTW, JOE has code to defeat output buffering to allow type-ahead to interrupt the screen update (so you don't have to wait long if you hit page-down 1000 times). Give these a try (use BAUD environment variable to fool JOE into thinking the terminal is at a different baud rate):
BAUD=4800 joe JOE defeats output buffering and uses scrolling commands
BAUD=9600 joe JOE uses scrolling commands
BAUD=19000 joe JOE uses scrolling commands
BAUD=38400 joe JOE does not use scrolling commands
The way JOE defeats output buffering is by pausing after each chunk of output, so ideally an accurate baud rate is needed. You could try it at 19200 baud by modifying the threshold in tty.c: look for 'tty_baud < 9600' and change it to 38400. The threshold is not high because sometimes the baud rate is reported as 9600 on terminal emulators, then the delays make JOE slower than it could be.
Long ago this was very important to me, since I wanted JOE to be useable at 2400 baud. These days.. not many people have real terminals.
Last edit: Joe Allen 2016-02-02
Oh one more thing you might want to try: gnu-emacs has some famous code for scrolling slow terminals. It's a dynamic programming algorithm by James Gosling (who had his own version of emacs before gnu-emacs, and who invented Java) that finds the optimal set of scrolling commands to change the old screen contents to the new screen contents (uses the concept of Levenshtein edit distance).
I didn't use this in JOE because I thought the result was kind of weird. On slow terminals, you would hit page down, and instead of a smooth scroll down, the terminal would do weird things to get it to look like the new screen contents. This is likely to happen when you are scrolling through many identical lines.
I've added options to control this: -left nn and -right nn sets the amount to jump when the window has to scroll. If nn is -1, then 1/4 of the width is used. If the baud rate is below 38400, nn is set to -1.