daa84 / neovim-gtk

gtk ui for neovim
GNU General Public License v3.0
716 stars 56 forks source link

Cannot middle-click to paste #126

Open kalekundert opened 6 years ago

kalekundert commented 6 years ago

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

daa84 commented 6 years ago

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

kalekundert commented 6 years ago

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?

cinghiopinghio commented 6 years ago

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.

daa84 commented 6 years ago

yes, looks like it does not work for command line

felipec commented 5 years ago

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

cetra3 commented 5 years ago

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.