Weird tmux behaviour when inserting text

This problem drove me nuts for months until I worked out how to fix it. My SSH terminal is set to xterm-256color and in my sysutils/tmux config file I had set-option -g default-terminal "xterm-256color". This caused the problem you mention. I fixed it by changing the config to say set-option -g default-terminal "screen-256color" instead. I guess the term needs to use specific screen escape codes instead of the normal xterm ones?
 
Just to note: I had this issue on localhost, not via ssh. When I try to check value of default-terminal inside of tmux it says Empty value
 
Back
Top