wincent/terminus

On vim startup ^[[I displayed at bottom of window.

codybuell opened this issue · 3 comments

Haven't had time to dig into it but have narrowed it down to terminus. On vim startup the message ^[[I flashes. Difficult to get a screenshot. More of a mild annoyance than an issue.

screen shot 2017-05-23 at 3 43 45 pm

Didn't notice the (B at the top. Not sure if that is related to terminus as well. A bit more background:
iterm2 Build 3.0.15
tmux 2.4
vim 8.0

This is most likely a result of focus reporting getting out of sync. I see this occasionally too, but not reliably.

From memory, the way it is supposed to work is as follows:

  • When Vim launches, it emits an escape sequence notifying the terminal (iTerm, presumably, but note it could also be tmux) that it wasn't to receive focus gained/lost events.
  • When you gain/lose focus, you get the events (these are the ^[[I that you're seeing) but Vim should consume them and they shouldn't be visible on the screen.
  • When Vim exits, it sends another sequence to let the host process (tmux or iTerm) know that it no longer wants the events.

In the case of tmux and splits, tmux is smart enough to know that if Vim has registered for events and you switch focus to another pane, is should sent a focus lost event to the pane in which Vim is running.

Things that can go wrong. Vim could crash or otherwise fail to unregistered for focus events when appropriate (for example, a rogue plug-in may have suppressed autocommands or mappings in some way that prevent the events from getting out, or from getting correctly consumed on the way in).

In short, this may happen some times, but rarely, and I've never found a reliable pattern to it. If you can identify a solid repro, that would be great, because this would be a good one to fix.

Looks like a bad config on my end. I have an earlier version of your ~/.vim/after/plugin/colors.vim file that I mangled up a bit. In particular, looks like it was calling s:SetColorScheme('focus') twice?

https://github.com/codybuell/dotfiles/blob/bad42ce2ac247485394223f6e7f5f397ab53af11/dotfiles/vim/after/plugin/colors.vim#L63