EtiamNullam / deferred-clipboard.nvim

Keep clipboard in sync with Neovim without the peformance hit.
77 stars 2 forks source link

feat: add CmdlineEnter event to autocmd #5

Open phgz opened 1 year ago

phgz commented 1 year ago

To be able to paste into cmdline with system clipboard

EtiamNullam commented 1 year ago

Seems like you're subscribing to the event in schedule_disable_of_continuous_clipboard_sync_on_focus_change function but it should be done in schedule_clipboard_sync_on_focus_change function instead. Currently your solution will not sync with system clipboard, instead it will wrongly assume focus events are supported in the client on cmdline enter.

I was considering hooking to CmdlineEnter event before as well but seems like it can fire too often and impact performace. Despite that it still won't solve every case where we might miss focus change event (hit-enter-prompt or just busy).