I'd like an easier way to access the scrollback (copy) buffer with the mouse.
Many terminal windows support vt220 mouse codes which include pointing, clicking, and scrolling with the scroll wheel. I'd like to see Screen use this feature to allow easy access to the copy buffer. The terminal window has 2 basic modes (appoligies I don't know the exact terminology here): 1) at the prompt which scrolls stuff off the top of the screen into the copy buffer and 2) full screen mode in an editor like vi or emacs. I am interested in the first mode where things scroll off the top of the screen into the buffer. Here's my vision: When the terminal is in the first mode and lines scroll off the top of the screen into the buffer, using the mouse wheel upward should put you into the scrollback mode. Scrolling down exits scrollback mode when you are at the bottom of the screen. Secondly, and this would be really cool, a CUI based scrollbar which you could click and drag with the mouse the scroll around in the scrollback buffer. I'm imagining a one or perhaps 2 character wide region on the left or right of the window, the scroller could be made of simple inverse block characters or maybe something in unicode. On a technical level, I do know that it is possible to get mouse clicks by putting the terminal in vt220 mode so this all is technically possible. Copy and paste would also need to work such that you could copy and paste large areas of text. For example today, in PuTTY, this works because you can select the text and it goes into the copy-paste buffer of the local computer. That needs to continue to work but also work with Screen's own copy-pasting. I think this is possible and I just saw a message a few days ago here where someone posted the escape codes to put stuff into the local computer's paste buffer! Some CUI based programs put the terminal into the second mode (full screen) and use these vt220 mouse codes, notably vi/vim and emacs. When this happens, Screen would need to relinquish the mouse to these programs. I know this does happen when you edit something, it's no longer possible to scroll the terminal window with the mouse wheel alone (it requires shift-scroll). This needs to continue to work. On a technical level, all of this should be possible. I looked briefly at the Screen source to see if I could help do this but unfortunately I couldn't follow it. Perhaps I can help move this forward in some way? This feature is something I've long wanted in Screen! Michael Grant
signature.asc
Description: PGP signature