mirror of
https://github.com/vim/vim.git
synced 2025-09-24 03:44:06 -04:00
updated for version 7.4.445
Problem: Clipboard may be cleared on startup. Solution: Set clip_did_set_selection to -1 during startup. (Christian Brabandt)
This commit is contained in:
@@ -958,8 +958,17 @@ vim_main2(int argc UNUSED, char **argv UNUSED)
|
|||||||
if (p_im)
|
if (p_im)
|
||||||
need_start_insertmode = TRUE;
|
need_start_insertmode = TRUE;
|
||||||
|
|
||||||
|
#ifdef FEAT_CLIPBOARD
|
||||||
|
if (clip_unnamed)
|
||||||
|
/* do not overwrite system clipboard while starting up */
|
||||||
|
clip_did_set_selection = -1;
|
||||||
|
#endif
|
||||||
#ifdef FEAT_AUTOCMD
|
#ifdef FEAT_AUTOCMD
|
||||||
apply_autocmds(EVENT_VIMENTER, NULL, NULL, FALSE, curbuf);
|
apply_autocmds(EVENT_VIMENTER, NULL, NULL, FALSE, curbuf);
|
||||||
|
# ifdef FEAT_CLIPBOARD
|
||||||
|
if (clip_did_set_selection < 0)
|
||||||
|
clip_did_set_selection = TRUE;
|
||||||
|
# endif
|
||||||
TIME_MSG("VimEnter autocommands");
|
TIME_MSG("VimEnter autocommands");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
4
src/ui.c
4
src/ui.c
@@ -571,7 +571,7 @@ start_global_changes()
|
|||||||
{
|
{
|
||||||
clip_unnamed_saved = clip_unnamed;
|
clip_unnamed_saved = clip_unnamed;
|
||||||
|
|
||||||
if (clip_did_set_selection)
|
if (clip_did_set_selection > 0)
|
||||||
{
|
{
|
||||||
clip_unnamed = FALSE;
|
clip_unnamed = FALSE;
|
||||||
clip_did_set_selection = FALSE;
|
clip_did_set_selection = FALSE;
|
||||||
@@ -584,7 +584,7 @@ start_global_changes()
|
|||||||
void
|
void
|
||||||
end_global_changes()
|
end_global_changes()
|
||||||
{
|
{
|
||||||
if (!clip_did_set_selection)
|
if (clip_did_set_selection == FALSE) /* not when -1 */
|
||||||
{
|
{
|
||||||
clip_did_set_selection = TRUE;
|
clip_did_set_selection = TRUE;
|
||||||
clip_unnamed = clip_unnamed_saved;
|
clip_unnamed = clip_unnamed_saved;
|
||||||
|
@@ -741,6 +741,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
445,
|
||||||
/**/
|
/**/
|
||||||
444,
|
444,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user