From 05bb841487dd085eb2140e18c5aa8a8b098244da Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Thu, 16 Jul 2015 18:01:54 +0200 Subject: [PATCH] Source provider at start if &cb is set #3025 The main problem is that is a default mapping but also sets got_int. Because of the former, normal_cmd() is kicked off which eventually leads to sourcing the clipboard provider. But due to the latter, do_source() throws an error, because got_int is set. This is a temporary workaround and sources the clipboard provider before main_loop(), if &clipboard is set. References #3023. --- src/nvim/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/nvim/main.c b/src/nvim/main.c index e2ae63e134..bfaeada6de 100644 --- a/src/nvim/main.c +++ b/src/nvim/main.c @@ -521,6 +521,11 @@ int main(int argc, char **argv) if (restart_edit != 0) stuffcharReadbuff(K_NOP); + // WORKAROUND(mhi): #3023 + if (cb_flags & CB_UNNAMEDMASK) { + (void)eval_has_provider("clipboard"); + } + TIME_MSG("before starting main loop"); /*