From 5e48b860361ae2ab15bbda596e28a98c550476bc Mon Sep 17 00:00:00 2001 From: bootleq Date: Wed, 27 Jun 2018 09:32:26 +0800 Subject: [PATCH] Update term control code for changing cursor shape We have OSC `50` used to change cursor shape when switching mode in Vim. The code is known conflict with xterm, thus may break non-iTerm2 users' terminal (if they are sharing tmux session with us). iTerm2 has deprecated OSC `50` with replacement `1337` about 2015, this commit just follow the change. --- vimrc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vimrc b/vimrc index ddb49fac..1ea4105a 100644 --- a/vimrc +++ b/vimrc @@ -104,11 +104,11 @@ autocmd VimResized * :wincmd = " Fix Cursor in TMUX if exists('$TMUX') - let &t_SI = "\Ptmux;\\]50;CursorShape=1\x7\\\" - let &t_EI = "\Ptmux;\\]50;CursorShape=0\x7\\\" + let &t_SI = "\Ptmux;\\]1337;CursorShape=1\x7\\\" + let &t_EI = "\Ptmux;\\]1337;CursorShape=0\x7\\\" else - let &t_SI = "\]50;CursorShape=1\x7" - let &t_EI = "\]50;CursorShape=0\x7" + let &t_SI = "\]1337;CursorShape=1\x7" + let &t_EI = "\]1337;CursorShape=0\x7" endif " Don't copy the contents of an overwritten selection.