2

When in copy mode, in a terminal that automatically updates/re-renders (for example during a tail -f read), tmux automatically scrolls to the bottom of the terminal when new text is rendered.

This is very annoying when you are inspecting some section far back in history, and the cursor suddenly jumps to the bottom of the screen.

Does anyone knows if it is possible to disable this behavior?

1
  • It might be useful to use pipe-pane to copy all that is output to a logging file and then inspect that independently of tmux.
    – meuh
    Commented Mar 20, 2020 at 14:30

1 Answer 1

2

tmux does not move to the bottom every time there is new data in copy mode, once you enter copy mode the pane is frozen and no new data is read until you exit copy mode.

tmux will exit copy mode (or any mode) automatically after three minutes if there is new data and no key presses. This is to prevent programs that don't expect the tty to block for long periods from misbehaving. There is some talk at the moment of copying the pane content when copy mode is entered so tmux does not need to block the tty, but I don't know if that will happen or not.

If you want to make this a longer time then you need to change WINDOW_MODE_TIMEOUT in tmux.h and rebuild tmux.

2
  • That is indeed the case. Thank you for the informative answer, hpe to see the non-blocking change happen.
    – lsund
    Commented Mar 20, 2020 at 14:19
  • I've done some tests. In old version(1.8), there is no copy-mode timeout. In newer version(2.7), timeout works. And I searched in the tmux repo at github. No Window_MODE_TIMEOUT in tmux.h. It looks code has changed.
    – Joe
    Commented Feb 26, 2023 at 14:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .