How can I turn off “scrolling the history” in iTerm2

后端 未结 7 1428
暗喜
暗喜 2021-01-29 18:28

I have installed the new iTerm 2. It asked me in a yellow bar at the top if I\'d like to enable a mouse feature. Unfortunately I don\'t remember the exact sentence anymore.

7条回答
  •  旧巷少年郎
    2021-01-29 18:52

    If you are trap in the scrolling history mode, you can escape by running vi and exit directly. You can also choose another program that use the alternate screen and exit directly.

    Scrolling the history with the mouse wheel should in theory never happens. It happens in practice because sometimes the alternate screen mode is not correctly switched back. The accepted answer solves the problem by deactivating a feature that is useful, namely scrolling in vi, less, ... with the mouse wheel or trackpad. You can keep the option from the advanced preferences:

    Scroll wheel sends arrow keys when in alternate screen mode

    set to yes. You will sometimes be trap in the scroll history mode. But if you know how to escape, it's not a problem.

提交回复
热议问题