diff src/if_ole.cpp @ 1791:5e225f973b5d v7.2.089

updated for version 7.2-089
author vimboss
date Wed, 28 Jan 2009 13:18:26 +0000
parents 9fbb40a1228a
children a0cce15dd2a9
line wrap: on
line diff
--- a/src/if_ole.cpp
+++ b/src/if_ole.cpp
@@ -353,9 +353,13 @@ CVim::SendKeys(BSTR keys)
     }
 
     /* Pass the string to the main input loop. The memory will be freed when
-     * the message is processed.
+     * the message is processed.  Except for an empty message, we don't need
+     * to post it then.
      */
-    PostMessage(NULL, WM_OLE, 0, (LPARAM)str);
+    if (*str == NUL)
+	vim_free(str);
+    else
+	PostMessage(NULL, WM_OLE, 0, (LPARAM)str);
 
     return S_OK;
 }