]> granicus.if.org Git - vim/commitdiff
updated for version 7.2-088 v7.2.088
authorBram Moolenaar <Bram@vim.org>
Thu, 22 Jan 2009 20:50:10 +0000 (20:50 +0000)
committerBram Moolenaar <Bram@vim.org>
Thu, 22 Jan 2009 20:50:10 +0000 (20:50 +0000)
src/os_mswin.c
src/version.c

index 32a068f6bb28273f74666a546744c9a9b4fb81d2..60c5a81a7d41454b04b7bfe19e921db338b701bc 100644 (file)
@@ -1223,6 +1223,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.
  *
@@ -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())
        {
index c0f593f0646613c080fdd410475604bc5782450e..b04c88168954a43ab6eb720b96aacbc96191ac01 100644 (file)
@@ -676,6 +676,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    88,
 /**/
     87,
 /**/