Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Leftover ^[[O characters on screen on blur #2

Open
rafi opened this issue Mar 27, 2015 · 6 comments
Open

Leftover ^[[O characters on screen on blur #2

rafi opened this issue Mar 27, 2015 · 6 comments

Comments

@rafi
Copy link

rafi commented Mar 27, 2015

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?

@bruno-
Copy link
Member

bruno- commented Mar 30, 2015

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.

@rafi
Copy link
Author

rafi commented Mar 30, 2015

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

@bruno-
Copy link
Member

bruno- commented Mar 30, 2015

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..

@liaden
Copy link

liaden commented Oct 11, 2015

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!.

@dailyherold
Copy link

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

@gbishop
Copy link

gbishop commented Jul 14, 2016

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.

mckellygit added a commit to mckellygit/vim-tmux-focus-events that referenced this issue Mar 3, 2021
… (cannot autocmd * * in vim, it throws E1155 exception)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants