neovim-gtk icon indicating copy to clipboard operation
neovim-gtk copied to clipboard

Cannot middle-click to paste

Open kalekundert opened this issue 6 years ago • 6 comments

In most linux applications (including gvim), middle-clicking pastes the contents of the secondary buffer into the active text field. However, nvim-gtk seems to ignore middle-clicks.

Technical information

  • OS: Fedora Linux
  • Neovim version: v0.2.2
  • Neovim-Gtk build version: 21e74c7ca7468a53ce1cbb449a19b8144f06836f

kalekundert avatar Jul 13 '18 18:07 kalekundert

middle clicks work with :set mouse=a. It's not nvim-gtk, this is function of neovim itself.

daa84 avatar Jul 17 '18 09:07 daa84

Thanks for the response, I didn't realize that I could get this to work with set mouse=a. However, in my hands, middle-clicking works in plain nvim even with set mouse="", while in nvim-gtk it only works with set mouse=a. Do you see this discrepency as well?

kalekundert avatar Jul 17 '18 15:07 kalekundert

While set mouse=a works in the text area, it does not help in the command line. Is there a workaround or something I'm missing? Unfortunately this do not work both with normal command line or in floating (gtk) command line.

cinghiopinghio avatar Aug 13 '18 15:08 cinghiopinghio

yes, looks like it does not work for command line

daa84 avatar Aug 14 '18 15:08 daa84

There is clearly a bug. Even without mouse=a the first paste works, but not the rest.

felipec avatar Jun 12 '19 14:06 felipec

I found that just setting set mouse=a is not enough because while you can use that to insert text from the primary clipboard (highlight/middle mouse), this only works for external applications.

To cut & paste back to the primary clipboard, you must also set clipboard=unnamed and then inside neovim-gtk yanking with y will put it back into the primary clipboard. While it doesn't do it automatically when highlighting text like other applications, yanking is fine as a work around.

cetra3 avatar Jul 29 '19 01:07 cetra3