From c826ebd3de7f73d360a8032127ed9d9db0543d8a Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 25 Aug 2016 10:43:00 -0400 Subject: perf: Disable clipboard in do_cmdline(). For any script--not just `:global` commands--there is no reason to update the system clipboard until the script is finished, so disable it during do_cmdline(). Before this change, 'clipboard=unnamedplus' causes scripted editing to be extremely slow (e.g. `:normal` in a while-loop). Closes #3534 --- src/nvim/ex_cmds.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'src/nvim/ex_cmds.c') diff --git a/src/nvim/ex_cmds.c b/src/nvim/ex_cmds.c index 981701f26d..e70ec9ab8a 100644 --- a/src/nvim/ex_cmds.c +++ b/src/nvim/ex_cmds.c @@ -4053,9 +4053,7 @@ void ex_global(exarg_T *eap) smsg(_("Pattern not found: %s"), pat); } } else { - start_batch_changes(); global_exe(cmd); - end_batch_changes(); } ml_clearmarked(); /* clear rest of the marks */ vim_regfree(regmatch.regprog); -- cgit