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