Fix XTerm,Tmux,Vim compatibility