Describe the bug
In alacritty (under both X and Wayland) and wterm at least, it won't start. It seems to occur under these conditions:
set mouse=a, of course):set mouse=a while it's running, it'll just hang there, unresponsive to mouse or keyboard]Not only will it not start, but Ctrl-C won't terminate it.
Currently, I'm working around these mouse woes in my vimrc file:
" Allow positioning the cursor and selecting text with a mouse, when possible
if has("mouse")
" No special mouse support under most conditions
set mouse=
if has("eval")
" Allow Vim to start even if ttymouse isn't set
if &ttymouse == ""
set ttymouse=xterm2
endif
if &ttymouse == "xterm2"
set mouse=nv
else
" Enable all mouse functions. Copy-and-paste may require calling external clipboard tools (e.g. xclip).
set mouse=a
endif
endif
However, I'd be willing to try to fix the code in Vim itself, to negate the need for special vimrc-file code. I see a couple solutions, but am not sure which one would be the best:
To Reproduce
Didn't I describe that above? I've also been able to get this to work (so to speak) in other terminal emulators:
export TERM=rxvt-unicode-256color).vim --clean.:set ttymouse=.:set mouse=a.Expected behavior
I expect it to start/be responsive.
Environment (please complete the following information):
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
Get the same problem with alacritty on Arch (alacritty/alacritty#3694), where .vimrc has:
if has('mouse')
if &term =~ 'xterm'
set mouse=a
else
set mouse=nvi
endif
endif
vim version 8.2.0510-2
And I'm not the first one: alacritty/alacritty#2931
Could please anyone look into this?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Neovim doesn't have this problem, as they removed the ttyterm option. Maybe Vim can do the same.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
There is no 'ttyterm' option. Did you mean 'ttymouse'?
I don't see how it can work without that option on all kinds of terminals.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
I cannot reproduce the original problem, and installing alacritty fails (or seems to succeed but then fails on startup).
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
There is no 'ttyterm' option. Did you mean 'ttymouse'?
I don't see how it can work without that option on all kinds of terminals.
LOL, I should have RTFA before commenting. Anyway, the removal is documented (Differences between Nvim and Vim), but I don't know how it's handled internally.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Being that vim works fine on most emulators and has since 1847, I'm not sure it should be on vim's part to make sure it works on all possible emulators people put out. Perhaps it should be the other way around, the emulator creators should make sure it is compatible with vim (if that's what they want). Otherwise that is exactly what those vimrc files are for. For odd corner cases and configurations like this. Just my 2 cents.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
As I mentioned, I cannot reproduce it (just tried again) and I can't guess what the problem is. Changing 'ttymouse' only changes what mouse codes are recognized, I can't imagine it causing a hang.
So, unless someone who can reproduce it gets Vim to hang in a debugger and tell us what is wrong, there is nothing that can be done.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
In your .vimrc just add:
if $TERM == 'alacritty' | set ttymouse=sgr | endif
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
About setting 'ttymouse' to "sgr" automatically: If the "XM" termcap entry contains "1006" it should happen automatically.
I'm still working on the terminfo/termcap stuff, but it might help to make sure the "XM" entry in terminfo is set appropriately. See just above ":help kitty-terminal".
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()