How to solve the display exception when i use vim+tmux in xshell

364 Views Asked by At

i use tmux + vim in xshell, When I use it will cause display exception

set laststatus=2 
  • use vim without tmux in xshell, it works ok
  • use vim + tmux in xshell without use statusline, it works ok
  • use in putty or mobaxterm, it works ok
tmux version
tmux 2.9a
vim version
VIM - Vi IMproved 8.1 (2018 May 18, compiled Jun 11 2019 09:13:18)
Included patches: 1-1517
server version
Linux version 3.13.0-32-generic (buildd@kissel) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014

enter image description here

1

There are 1 best solutions below

1
On

I solved the problem that has troubled me for three years.

.bashrc:

export TERM=screen-256color

.tmux.conf:

set -g default-terminal "screen-256color"