vim-tmux-focus-events icon indicating copy to clipboard operation
vim-tmux-focus-events copied to clipboard

Leftover ^[[O characters on screen on blur

Open rafi opened this issue 10 years ago • 6 comments
trafficstars

When leaving a tmux pane with Vim inside, there is a visible ^[[O string left where cursor was. This isn't text that is being processed, just a bit annoying.. any clue?

rafi avatar Mar 27 '15 13:03 rafi

Hey, which tmux command do you use when this appears? I tried regular tmux pane navigation (with prefix + arrows), switching previous/next window or even leaving session with prefix + s but I don't get that.

bruno- avatar Mar 30 '15 12:03 bruno-

Hmmm. Maybe because I'm using vim-tmux-navigator with its Ctrl+h/j/k/l bindings... ?

rafi avatar Mar 30 '15 16:03 rafi

I also managed to find a way to reproduce it consistently by using tmux-sessionist prefix + g feature.

au FocusGained * silent redraw! in vimrc seems to fix this.

I'm not sure I wanna add this line to the plugin though, because native tmux behavior does not trigger the unwanted characters..

bruno- avatar Mar 30 '15 22:03 bruno-

For what it is worth, I was seeing this problem and I am using vim-tmux-navigator as well. I used bruno's approach with a slight tweak: au FocusLost * silent redraw!.

liaden avatar Oct 11 '15 15:10 liaden

Just found this after a journey into improving my number/relativenumber behavior while using terminal vim + tmux. Thank you bruno and liaden for the tip!

" Toggle relative numbers  on FocusLost
autocmd FocusLost * :set number norelativenumber
" Using vim-tmux-navigator bindings, on FocusLost ^[[O was left behind
autocmd FocusLost * silent redraw!
autocmd FocusGained * :set number relativenumber
" Toggle relative numbers in insert mode
autocmd InsertEnter * :set number norelativenumber
autocmd InsertLeave * :set number relativenumber

dailyherold avatar Mar 02 '16 04:03 dailyherold

This must somehow be terminal related because I never see it in Secure Shell from my Chromebook but I see it in GNOME terminal 3.18.3.

gbishop avatar Jul 14 '16 13:07 gbishop