Bram,
there seems to be a problem, that vim also records K_SPECIAL and the 
following bytes that are used for mouseclicks, and which seems to be a 
problem when replaying a script in Windows.
See this question stackoverflow:
http://stackoverflow.com/questions/3981535/using-the-w-option-of-vim

This patch fixes it by making sure, when writing the scriptout file, to 
skip the K_SPECIAL and following bytes.

diff --git a/src/getchar.c b/src/getchar.c
--- a/src/getchar.c
+++ b/src/getchar.c
@@ -1228,6 +1228,7 @@
     int                c;
     char_u     buf[2];
     int                todo = len;
+    static int skip = 0;
 
     /* remember how many chars were last recorded */
     if (Recording)
@@ -1238,13 +1239,26 @@
     {
        /* Handle one byte at a time; no translation to be done. */
        c = *s++;
-       updatescript(c);
 
        if (Recording)
        {
            buf[0] = c;
            add_buff(&recordbuff, buf, 1L);
        }
+
+#ifdef FEAT_GUI
+       /* but skip K_SPECIAL and following bytes */
+       if (c == K_SPECIAL || skip)
+       {
+           if (c == K_SPECIAL)
+               skip = 2; /* skip K_SPECIAL and following 2 bytes */
+           else
+               skip--;
+           continue;
+       }
+#endif
+       updatescript(c);
+
     }
     may_sync_undo();
 


Mit freundlichen Grüßen
Christian
-- 
Du kannst nicht verhindern, daß ein Vogelschwarm über deinen Kopf
hinwegfliegt. Aber du kannst verhindern, daß er in deinen Haaren
nistet.
                -- Martin Luther

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Raspunde prin e-mail lui