I recently started using tmux
(in addition to screen
), both in a Linux environment and in msys2
(which is also new to me and for which I cannot install screen
).
Very similar to screen
, starting tmux
disables the shift-PgUp scrolling (and the scroll bar in the terminal emulator). For both terminal multiplexers the Internet does provide an easy solution. In the case of tmux
it is adding this setting to the configuration:
set -g terminal-overrides 'xterm*:smcup@:rmcup@'
This works fine in the Linux environment but not in msys2
. $TERM
is set to xterm
.
Unfortunately I am not familiar (yet) with the internal details of terminals so I neither understand why this setting is necessary nor why it could fail. After all before starting tmux
the msys2
terminal emulator does have this capability.
The Internet contains a lot of questions about tmux
scrolling but I could not find any for this problem with msys2
.
Meta
I was thinking about whether this is the most suitable site for this question (and it may well not be). So if this does not result in a sufficient answer but you have an idea where it might make more sense to ask this then feel free to let me know.
scrollback-fix () { printf '\033\143'; }
This restores Shift-PgUp and Shift-PgDn for me. WTS, I don't usetmux
at all.TERM=xterm-256color