1

I have an issue when using GNU screen in windows terminal. Mouse wheel scrollback doesn't work.

When using the wheel it does not scroll more than one window height, continues on the printouts before I entered the gnu screen. When using putty it works normally.

Also when using screen scroll (C-a / Escape / "up" or "down") it scrolls normally (past window top). I am using "Screen version 4.01.00devel (GNU) 2-May-06" and "Windows Terminal Version: 1.5.10271.0". As my company manages this I can not update to a newer version.

This is my screen file:

# Use bash
shell /bin/bash

# Remove visual bell flash
vbell off

autodetach on

# Enable multiuser:
multiuser on

# Big scrollback
defscrollback 10000

# No startup message
startup_message off

# Display the status line at the bottom
hardstatus on
hardstatus alwayslastline
backtick 0 30 30 sh -c 'screen -ls | grep Multi | cut -f 2'
hardstatus string "%{WK}%-w%{kc} %t [%n] %{-}%+w %=%{+b yK}|  %`@%H ~ %Y-%m-%d ~ %c "

# Make first screen for general work
chdir /home/me/scripts/
screen -t 'NODE 1' 1

# Make second screen for general work
screen -t 'NODE 2' 2

# Make screen for logging
chdir /home/me/scripts/LOGGING/
screen -t 'LOGS' 3

# Miscelaneous
chdir /home/me/
screen -t 'MISC' 4

# Switch to the first screen
select 1

# termcapinfo xterm ti@:te@
termcapinfo xterm 'hs:ts=\E]2;:fs=\007:ds=\E]2;screen\007:ti@:te@'
termcapinfo  xterm Z0=\E[?3h:Z1=\E[?3l:is=\E[r\E[m\E[2J\E[H\E[?7h\E[?1;4;6l

I found online some issues where adding ti@:te@ fixed it, but my screen file already has that. I have tried looking online for documentation on 'ti@' and 'te@' but can not find any. Also I have found somewhere that windows terminal doesn't support screen buffer, which seems odd, but I don't know how to verify.

Any advice would be welcomed!

spiroX
  • 11
  • 2
  • I found a few issues that look to be related: [Scrollback buffer doesn't work with screen #5284](https://github.com/microsoft/terminal/issues/5284) and "ti", "te" info [How does vi restore terminal content after quitting it?](https://stackoverflow.com/questions/15044274/how-does-vi-restore-terminal-content-after-quitting-it) [What does [?1049h do?](https://unix.stackexchange.com/questions/288962/what-does-1049h-and-1h-ansi-escape-sequences-do) Looks like screen uses a different buffer than Win Term and it doesn't switch between the two when scrolling with a mouse. – spiroX Feb 03 '21 at 13:29

0 Answers0