summaryrefslogtreecommitdiff
path: root/src/ui.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2017-03-29 19:20:41 +0200
committerBram Moolenaar <Bram@vim.org>2017-03-29 19:20:41 +0200
commit3fcfa35f82b9d1ef5e95051b3a45578e10c14ec3 (patch)
tree84aa6be11d89fb6fa012413667901ad75e32c8b1 /src/ui.c
parent99a6e8dd824399332563caa6cacfcda33da1f366 (diff)
downloadvim-git-3fcfa35f82b9d1ef5e95051b3a45578e10c14ec3.tar.gz
patch 8.0.0522: Win32: when 'clipboard' is "unnamed" yyp does not workv8.0.0522
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.
Diffstat (limited to 'src/ui.c')
-rw-r--r--src/ui.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/ui.c b/src/ui.c
index 0bd2edc93..8691ab741 100644
--- a/src/ui.c
+++ b/src/ui.c
@@ -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.
@@ -590,6 +589,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.
*/
void
@@ -619,6 +628,7 @@ end_global_changes(void)
}
}
}
+ clipboard_needs_update = FALSE;
}
/*