summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvimboss <devnull@localhost>2009-01-22 20:50:10 +0000
committervimboss <devnull@localhost>2009-01-22 20:50:10 +0000
commit5822517b509806d29f469fb7b47342f330684c91 (patch)
treed94630dec1714a5a9b85f2cd0351cd0509e2752b
parent38bda1ea11ae611f70a83413ec45b339a369d7ac (diff)
downloadvim-5822517b509806d29f469fb7b47342f330684c91.tar.gz
updated for version 7.2-088v7.2.088v7-2-088
-rw-r--r--src/os_mswin.c23
-rw-r--r--src/version.c2
2 files changed, 23 insertions, 2 deletions
diff --git a/src/os_mswin.c b/src/os_mswin.c
index 32a068f6..60c5a81a 100644
--- a/src/os_mswin.c
+++ b/src/os_mswin.c
@@ -1224,6 +1224,25 @@ utf16_to_enc(short_u *str, int *lenp)
#endif /* FEAT_MBYTE */
/*
+ * Wait for another process to Close the Clipboard.
+ * Returns TRUE for success.
+ */
+ int
+vim_open_clipboard()
+{
+ int delay = 10;
+
+ while (!OpenClipboard(NULL))
+ {
+ if (delay > 500)
+ return FALSE; /* waited too long, give up */
+ Sleep(delay);
+ delay *= 2; /* wait for 10, 20, 40, 80, etc. msec */
+ }
+ return TRUE;
+}
+
+/*
* Get the current selection and put it in the clipboard register.
*
* NOTE: Must use GlobalLock/Unlock here to ensure Win32s compatibility.
@@ -1254,7 +1273,7 @@ clip_mch_request_selection(VimClipboard *cbd)
* Don't pass GetActiveWindow() as an argument to OpenClipboard() because
* then we can't paste back into the same window for some reason - webb.
*/
- if (!OpenClipboard(NULL))
+ if (!vim_open_clipboard())
return;
/* Check for vim's own clipboard format first. This only gets the type of
@@ -1562,7 +1581,7 @@ clip_mch_set_selection(VimClipboard *cbd)
* because then we can't paste back into the same window for some
* reason - webb.
*/
- if (OpenClipboard(NULL))
+ if (vim_open_clipboard())
{
if (EmptyClipboard())
{
diff --git a/src/version.c b/src/version.c
index c0f593f0..b04c8816 100644
--- a/src/version.c
+++ b/src/version.c
@@ -677,6 +677,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 88,
+/**/
87,
/**/
86,