-
Notifications
You must be signed in to change notification settings - Fork 299
[WIP] Handle missing mouse events #2513
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2513 +/- ##
==========================================
- Coverage 44.26% 44.23% -0.04%
==========================================
Files 345 345
Lines 13933 13945 +12
Branches 1829 1831 +2
==========================================
Hits 6168 6168
- Misses 7525 7537 +12
Partials 240 240
Continue to review full report at Codecov.
|
@CrossR @Akin909 Any feedback on this? I'd like to know if you think this is a good direction, keeping in mind we can also map a lot of other mouse events that we aren't currently. It is improbable that a user has a particular mouse mapping, but it's good to cover this. Also we may in the future map mouse events directly from Oni, before passing to vim. |
Hi, |
@badosu looks good to me, I actually work almost exclusively off a laptop with a monitor so can't actually test it out properly |
@daxid If on Linux and X11, yes |
Testing this has been a challenge, I exposed the raw sendInputEvents function and the clipboard from electron and it still does not work, see:
Any help is welcome |
@bryphe @Akin909 Any insights on how to test? It's the only thing missing to merge this. |
@badosu Tell me how I can test it and I will try to help. |
I think the issue is our A couple of ways you can exercise this locally:
The |
Handle the other mouse events:
-
<MouseRight>
: enters visual mode if not into it and sets the selection from the cursor to the mouse position-
<MouseMiddle>
: If OS is linux and running X, paste the selection clipboard.I ran into this because I was looking for a way to make middle click paste work. At first I looked into using
clipboard.readText('selection')
but decided to let vim handle it instead, also used the opportunity to let vim handle the right click as well.I'll remove WIP when I add some tests and receive feedback.
See all possible events we can pass to vim (source):
Fix #1068