Recently, on Debian Sid (accessed via SSH from an ArchLinux machine using Terminator), something has started triggering the [I
/ :ilist
function whenever vim gains focus. If I start vim without arguments I get E349: No identifier under cursor
.
Nothing in the au BufEnter
list looks relevant, and au FocusGained
is empty. I have no vimrc in my home folder, and the only line in vimrc.local was set ttymouse=
. In the comments, it was discovered that set ttymouse=
is necessary to reproduce the problem.
vim --version
is 8.2 installed from the official sid package. My $TERM
is xterm-256color
. The ability to detect terminal focus was introduced in patch 2345, so only systems with fairly recent vim packages are able to reproduce.
For now, I'm avoiding the problem by adding set t_fd=
and set t_fe=
in the system's vimrc.local (as suggested by :help focus
), but I'd like to figure out what's actually causing it. What's doing this and how can I turn it off?
It does not reproduce inside vim --clean
unless I manually run :set ttymouse=
vim --clean
to see if the problem still happens when you don't have any vimrc or plug-ins loaded... (Including the system-wide vimrc shipped by Debian.) It would be nice to check whether that makes a difference or not...vim --clean
is a fantastic thing I didn't know existed.src/term.c
in that patch, that should explain the[I
. I'm betting what's happening is that your Terminator doesn't recognize those special sequences... Can you try it under actualxterm
or something likeurxvt
orgnome-terminal
?xterm
but noturxvt
... i note that the line you linked in the source code is gated byif (use_xterm_like_mouse(term))
and if i removeset ttymouse=
from vimrc.local the problem goes awayFocusGained
orFocusLost
should be fired. Relevant issue: github.com/vim/vim/issues/7755