Disable scroll inside Xfce terminal / Avoid scrolling through command history
You are describing the feature of VTE (used in XFCE Terminal) which translates wheel-mouse scrolling into up/down cursor-keys when using the alternate-screen. That happens if you are running screen
in something like xterm
. You can avoid that by preventing screen
from using the terminal's alternate screen feature.
For example (see How to disable alternate buffer in GNU screen itself but not for vim, less inside it?), tell screen
that the feature does not exist (by putting this in .screenrc
):
termcapinfo xterm ti@:te@
A similar workaround is used for tmux
(see Properly disable terminal capabilities for alternate screen in tmux), putting this in .tmux.conf
:
set -ga terminal-overrides ',xterm*:smcup@:rmcup@'
This translation of scrolling behavior does not appear to be configurable in VTE-based terminals. It is configurable in xterm
, e.g., alternateScroll
(patch #282).
Further reading:
- Make screen work like a terminal (scrolling + alternate screen)
- Fixing the alternate screen problem (one of many pages pro/con)
- Why doesn't the screen clear when running vi?