Closed valpackett closed 6 years ago
Ok, thanks i test it later Another problem i find in part 1 is paste with toolbar button make neovimgtk freeze. Looks like some problem with combination of call to neovim rpc with paste processing.
oh. Does it say anything about mutexes being already locked on the console?
Ok for me primary clipboard works ok :+1:
About freeze: it does not print anything in console.
I think problem that to paste nvim_command
function is used - and this is function 'sync', so it waits for response. While it wait - main thread is locked, so function that get clipboard content also wait.
nvim_input
- that used for user input is 'async', so it does not wait for execution and in this case all works without problem.
So i see a number of possible solutions:
command
to input
functiongtk_main_iteration_do
in loop.i like 2 solution :smile: because it prevent future bugs with same problem also return value of call still can be used.
Think I implement fix 2 as it also must fix some other issue
Solution 2 was bad because of all this RefCell stuff. So i implement 3 and looks like it works :smiley: So now it works
PRIMARY
support (please test, I'm currenty running Wayland where it's not a thing)yy
line copying (by storing the last register type — this is mostly fine, but e.g. pasting from other apps after copying lines would paste as lines)Actually, register type should be stored in the GTK clipboard, like in good old GVim. I'm looking into this, including https://github.com/gtk-rs/gtk/issues/591