Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does tmux erase terminal contents on editor exit?

Say I'm running tmux and use "ls" to get something on the screen. Then I enter Vim to edit some file. After exiting Vim, tmux erases whatever text is above the bash prompt (not like the clear command since the prompt stays in the same place).

Is there a way to prevent this behavior? I'm using tmux 1.3 in Terminal.app on OS X.

like image 253
soolwan Avatar asked Oct 11 '25 11:10

soolwan


1 Answers

If your version of tmux has this option, add this line to your ~/.tmux.conf:

set-window-option -g alternate-screen on
like image 183
Dennis Williamson Avatar answered Oct 14 '25 20:10

Dennis Williamson