Closed arepavich closed 2 years ago
That's strange, I've never run into this issue. Maybe there is a conflict with another plugin. Can you try disabling your other plugins and see if the problem is still there? Also can you share your Neovim config so that I can reproduce on my side?
Just tested and confirmed that this issue still persists when nvim-osc52 is the only installed/active plugin.
Interestingly, I have been unable to reproduce this when invoking via command mode with
:lua require('osc52').copy_visual()
- it only appears to occur when invoked via a keybind.
I tried a different keybind in an attempt to rule out any potential conflicts with Neovim internals (I use ,
as my leader key, which I've heard can conflict in some cases). For this, I changed the keybind for copy_visual to gac
but I saw no change in behavior.
I'm currently using Neovim v0.7.0 and you can find my config here: https://github.com/arepavich/dotfiles/tree/master/config/nvim
Yeah my bad, I didn't read correctly the doc of visualmode()
and it turns out its behavior is different when it is called for the first time. I also forgot that I don't use the mappings directly (I'm using the clipboard provider) so that's why I never saw that bug. Sorry about that.
Just tested with the latest and I can confirm that it appears to be fixed.
Thanks for making and maintaining this magnificent plugin, by the way; this has been a huge help in my workflow, and the fact that it just works out of the box as a drop-in solution is amazing!
Great! Thank you, I'm glad you like the plugin :)
When nvim-osc52 has not been previously invoked since Neovim was launched, an attempt to invoke it via copy_visual (per the recommended keybindings,
<leader>c
) does not properly copy the visual selection. Instead, the plugin appears to target results for the most recently used search pattern.Expected behavior: The visually selected text should be copied to the system clipboard.
Actual behavior (two variants):
Any subsequent invocations of nvim-osc52 within the same session appear to be handled properly.