clipboard: avoid clipboard during :global. #2809

This is equivalent to patches 7.4.396, 7.4.445 and 7.4.598.

vim-patch:7.4.396

Problem:    When 'clipboard' is "unnamed", :g/pat/d is very slow.
(Praful)
Solution:   Only set the clipboard after the last delete. (Christian
Brabandt)

1f285eb49a

vim-patch:7.4.445

Problem:    Clipboard may be cleared on startup.
Solution:   Set clip_did_set_selection to -1 during startup. (Christian
	    Brabandt)

1a19d37d90

vim-patch:7.4.598

Problem:    ":tabdo windo echo 'hi'" causes "* register not to be
changed.
	    (Salman Halim)
Solution:   Change how clip_did_set_selection is used and add
	    clipboard_needs_update and global_change_count.  (Christian
	    Brabandt)

af6a579263

Co-Author: @bfredl
This commit is contained in:
Felipe Morales
2015-06-08 16:47:10 -03:00
committed by Justin M. Keyes
parent 7ee94d2dd7
commit acdac914d5
10 changed files with 106 additions and 17 deletions

View File

@@ -9380,6 +9380,8 @@ static void ex_folddo(exarg_T *eap)
{
linenr_T lnum;
start_global_changes();
/* First set the marks for all lines closed/open. */
for (lnum = eap->line1; lnum <= eap->line2; ++lnum)
if (hasFolding(lnum, NULL, NULL) == (eap->cmdidx == CMD_folddoclosed))
@@ -9388,6 +9390,8 @@ static void ex_folddo(exarg_T *eap)
/* Execute the command on the marked lines. */
global_exe(eap->arg);
ml_clearmarked(); /* clear rest of the marks */
end_global_changes();
}
static void ex_terminal(exarg_T *eap)