Closed ozankabak closed 5 years ago
Thanks for the PR and the issue!
Unfortunately where I am testing, autodetection doesn't always work, despite what the docs say. The following with vim -u NONE
(no plugins loaded):
ttymouse
is empty, meaning that the mouse doesn't work (likely because Vim doesn't know about the tmux
or tmux-256color
$TERM
type that newer tmux uses).ttymouse
gets set to xterm
(not sgr
), so mouse doesn't work past column 223.Conversely if I start Vim without -u NONE
(ie. plugins get loaded, including Terminus, but I've commented out the ttymouse
section entirely to see what happens):
ttymouse
is empty, meaning that the mouse doesn't work (same reason as above).ttymouse
gets set to xterm2
(not sgr
), so mouse doesn't work past column 223.:verbose set ttymouse?
reveals nothing about where this setting is coming from, so it doesn't seem to be another plug-in (no idea why this is xterm2
and in the -u NONE
case it is xterm
).So, things would still work for me because I do have mouse_sgr
, so ttymouse
gets set to sgr
. But I worry that this change might not work so well for others who don't have that feature, especially if they use tmux.
As a workaround, can you not just set ttymouse=xterm
in ~/.vim/after/plugin/terminus.vim
?
I tested the proposed change using both an old setup (i.e. tmux 1.4 and VIM 7.3.315) and a new setup (tmux 2.1 and VIM 7.4.1301). I tried both with and without "-u NONE", and it works fine. It correctly detects sgr
when available, and falls back to either xterm
or xterm2
when not. I don't see how forcing xterm2
is a safer choice than this PR.
Fix for Issue #13.