-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Mouse handling delayed in neovim terminal #99
Comments
I suspect this has something to do with the move over from termbox to tcell for the terminal rendering library |
I was trying to look into this a bit and only found this issue which kinda correspond in However, when I tried to upgrade Was testing it in neovim and in vim (the same problem). But actually when I was trying I will try to debug it later. |
@dankox anything I can specifically test? |
@Kavantix I'm sorry, I kinda forgot about this issue. However, I was doing some tests and I'm not really sure if this works at all in any case anywhere. What I was using initialy was Mouse doesn't work for me in
My environment is:
Can you please provide a source code or example of application using original |
@dankox you probably don’t have mouse mode enabled in vim then (it’s off by default) |
Just tried what you said and my mouse input has no delay:
Envourment:
May i ask what terminal emulator you are using? |
Weird, I have tried on several terminal emulators (iTerm, kitty, alacritty, macos terminal) and all behave the same on my system. I am using neovim nightly though. Lazygit is indeed fast but that is still using the termbox version right? |
Just tried out the same thing using Neovim nightly (v0.6.0-dev+551-ged2573b7e from aur/neovim-nightly-bin) but it's still as fast.
I think so, this was a tui program i knew has mouse support so i tested it also. tough now looking at it back it was a bit pointless. |
This comment has been minimized.
This comment has been minimized.
Ooooooooooh... now I feel stupid 🤦♀️ my bad :) So I've tried it with But I have to say, this is a bit weird, because for Looking at it more precisely, I think there is something "wrong" with
From this I can guess that What we can do:
Anyway, regardless of next action, I want to do some more debugging on this in |
@mjarkk can you try |
@dankox thanks for the extensive explanation! |
Btw, my preference would be adding the mouse release, a drag feature is something I'm planning on adding to one of my projects so would be very welcome |
@dankox Just tried out the _demos/mouse.go and now i see the problem the issue describes also on linux with neovim v0.6.0 |
@Kavantix if you want, you can try to debug it in I want to look at it later this day when I will get the time to get better idea of what is going on. |
I opened neovim/neovim#16371 at their side |
@Kavantix thanks for letting us know. I can see that in neovim they are fixing propagation of that event to terminal so that's cool. I didn't have much time recently to look more into this, but I think we definitely should add the MouseRelease event and implement it properly. Keeping this issue open until it's done. |
Describe the bug
Mouse clicks inside neovim terminal are delayed until the next system event.
Mouse handling works fine with
jroimartin/gocui
To Reproduce
Steps to reproduce the behavior:
:term
MouseLeft
keybindingExpected behavior
The mouse click should be detected immediately
Environment (please complete the following information):
Context
g.Update
does not helpMouseRelease
is trigged (although not on release)`The text was updated successfully, but these errors were encountered: