wincent / terminus

🖥 Enhanced terminal integration for Vim
BSD 2-Clause "Simplified" License
463 stars 25 forks source link

Mouse support does not work with old VIM/tmux versions. #13

Closed ozankabak closed 8 years ago

ozankabak commented 8 years ago

Hello. Due to constraint not under my control, I have to get by with old versions of VIM and tmux. I work with VIM 7.3 (patches 1-315) and tmux 1.4.

For some reason, mouse does not work if I let Terminus set it up. If I do not load Terminus, and have set mouse=a with set ttymouse=xterm, it works. I don't understand why mouse doesn't work when I let Terminus load. When Terminus is loaded, does it do anything, other than setting these, that might interfere?

ozankabak commented 8 years ago

Oh, I see it does set ttymouse=xterm2, not set ttymouse=xterm. That's the culprit. I think the block starting at line 64 needs to be fixed for setups like mine, but I'm not sure how. Any ideas?

ozankabak commented 8 years ago

Okay, a quick read of :help ttymouse reveals that VIM automatically picks the right choice between xterm and xterm2 by checking the xterm version. Therefore, removing the else clause forcing xterm2 resolves the problem. I tested in both my setups, and auto-detection does work in both. Created PR for the fix.

wincent commented 8 years ago

Going to close this so we can continue discussion on the PR. Thanks for submitting!