0
0
mirror of https://github.com/vim/vim.git synced 2025-09-27 04:14:06 -04:00

patch 8.0.0522: Win32: when 'clipboard' is "unnamed" yyp does not work

Problem:    MS-Windows: when 'clipboard' is "unnamed" yyp does not work in a
            :global command.
Solution:   When setting the clipboard was postponed, do not clear the
            register.
This commit is contained in:
Bram Moolenaar
2017-03-29 19:20:41 +02:00
parent 99a6e8dd82
commit 3fcfa35f82
8 changed files with 31 additions and 6 deletions

View File

@@ -392,8 +392,6 @@ ui_breakcheck_force(int force)
#if defined(FEAT_CLIPBOARD) || defined(PROTO)
static void clip_copy_selection(VimClipboard *clip);
/*
* Selection stuff using Visual mode, for cutting and pasting text to other
* windows.
@@ -569,7 +567,8 @@ clip_copy_selection(VimClipboard *clip)
* considerably.
*/
static int global_change_count = 0; /* if set, inside a start_global_changes */
static int clipboard_needs_update; /* clipboard needs to be updated */
static int clipboard_needs_update = FALSE; /* clipboard needs to be updated */
static int clip_did_set_selection = TRUE;
/*
* Save clip_unnamed and reset it.
@@ -589,6 +588,16 @@ start_global_changes(void)
}
}
/*
* Return TRUE if setting the clipboard was postponed, it already contains the
* right text.
*/
int
is_clipboard_needs_update()
{
return clipboard_needs_update;
}
/*
* Restore clip_unnamed and set the selection when needed.
*/
@@ -619,6 +628,7 @@ end_global_changes(void)
}
}
}
clipboard_needs_update = FALSE;
}
/*