sjl / vitality.vim

Make Vim play nicely with iTerm 2 and tmux.
http://github.com/sjl/vitality.vim
MIT License
320 stars 30 forks source link

Cursor state is messed up when using tmux to switch pane away while in insert mode #29

Open unphased opened 9 years ago

unphased commented 9 years ago

If I'm not using FocusLost to stopinsert and I click out of the pane, the cursor isnt being reset to block.

Curiously enough, then when using tmux to switch back to the pane that has the Vim, it will flicker to block, then flicker back to line.

The evidence that I have which indicates this is a vitality problem is that if I actually do this: au FocusLost * stopinsert then the problem goes away! (Click outside of vim while in insert mode, and the cursor properly gets returned to normal).

So I think something is causing vitality to set the cursor back to line when switching out to another tmux pane because it thinks it should be a line because the Vim is still in insert mode.