Draft
Conversation
Author
|
I think this is actually ready for review, it has been working for me on two versions of Neovim (0.11.5 and the current master). If you are interested that is. |
Author
|
|
We now use the WinClosed autocmd for this which means that it also happens when using builtin vim functionality to close the window.
…21 errors if Release event triggers before Mouse event.
…f s:click is uninitialized, ensuring plumbing works even if RightMouse event is missed or blocked.
Fix Neovim signal sending and job output routing, and restore valid Vimscript assignments/escaping that were breaking plumbing and register pastes.
In Neovim 0.12+, normal! with mouse key events (<LeftMouse>, <LeftRelease>) is restricted and cannot be used to replay mouse events. This caused E492 errors in s:RightRelease. Fixes: - s:MousePress: use wincmd w + cursor() for Neovim instead of normal! \<LeftMouse> - s:MiddleRelease: skip normal! \<LeftRelease> for Neovim - s:RightRelease: skip normal! \<LeftRelease> for Neovim (root cause of the reported E492 error in issue #1) Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
Using expand('<cWORD>') in s:RightRelease meant that s:Open received only
a single word, but still with the absolute column index of the mouse
click. This caused regex column matches in s:Match to fail silently.
By using getline('.'), s:Open receives the full line, ensuring that
column-based plumbing patterns (like URL detection) work correctly when
right-clicking.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
So far it seems to work more or less fine with my Neovim 0.11.5, but I have already found one bug (see the last commit in this PR), and I would probably rather give it a bit more time (a week or so). If you are not interested in having the plugin useful for both Vim and Neovim users, just let me know, and I will gladly maintain my own Neovim only (and mostly likely Lua-only) fork.