contour
contour copied to clipboard
VT sequence to control and report scrollbar
I think nobody has done this yet, and I wonder why, but in alt screen, letting the app control the scrollbar opens really nice possibilities to apps like vim.
Investigate on that. Come come up with a proposal, then implement it maybe?
This is CSI ? 30 h/l to enable/disable visibility of the scroll bar.
See http://gnu-darwin.org/ProgramDocuments/rxvt/rxvtRef.html#PrivateModes
I thought the intention was for an app that has some sort of buffer to be able to tell the terminal what its position was in that buffer. For example, you're an editor viewing a file with 1000 lines, and you're on line 500. If you pass that info on to the terminal it can display a scrollbar with the thumb element half way down (this is assuming you're in the alt buffer, which doesn't typically have a scrollback).
Then when the user manipulates the scrollbar to scroll up and down, the terminal can send through arrow keys like it does in alternate scroll mode. Although maybe a dedicated input sequences would be better, so you can scroll independent of the cursor position. Probably all you need is a "goto line number" sequence. If the terminal knows the available range of the scrollbar, and the current position, any scrolling operation could be handled that way. Just an idea.
Of course I may be wrong, and Christian may have had something completely different in mind.
@j4james you are perfectly right. that exactly was my idea. I see that very similar to how mouse reporting is done, and that's a very valid UI element of a terminal that makes sense to be controlled by an app when in alternate mode, too. CSI ? 30 h/l does only control visibility, not positioning nor reporting. :)