When I use tmux
and enter a command that exceeds the line, it fails to redraw the previous line. It simply clears the current line and I can't see what I just wrote. It does only redraw the first line.
This also happens when I press up and the last command does not fit the current line (I only see the last line). If I then press up and down again, I can see all lines of the command.
I'm not sure what causes that problem, but it's pretty annoying. Does it have to do something with my prompt? Just in case, here it is:
export PS1="%{$fg[blue]%}%n%{$reset_color%}@%{$fg[green]%}%m %{$fg[yellow]%}%~ %{$reset_color%}% "
export PS2=$_>
($TERM is set to screen)
By the way, I'm using zsh and OSX Termial, but the problem is also there with bash.
Also the problem does not exist with xterm
(XQuartz), so i guess it's caused by OSX' Terminal.app.
- Does anyone know a way to fix this anyways?
- Perhaps I could force a redraw somehow?
Just found this old thread on the tmux mailinglist.
I tried different values for $TERM
(screen, screen-256colors, xterm, xterm-color, nsterm) but the error persists.
So I guess there is nothing I can do despite switching to another terminal emulator?