On Di, 08 Okt 2013, Urtica dioica wrote:
> I tried your patch. It seems to stop duplication when recording a
> macro with q, but not when recording keystrokes to a file with vim -w.

Try this updated patch.


regards,
Christian

-- 
Entweder das Neueste oder das Älteste (aus der Jugend) gefällt auf
Reisen. Am Ende gibts kein Neuestes mehr, aber das Älteste wird älter.
                -- Jean Paul

-- 
-- 
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.
diff --git a/src/message.c b/src/message.c
--- a/src/message.c
+++ b/src/message.c
@@ -887,6 +887,8 @@
     int		oldState;
     int		tmpState;
     int		had_got_int;
+    int		had_Recording = Recording;
+    FILE	*had_scriptout = scriptout;
 
     if (redraw == TRUE)
 	must_redraw = CLEAR;
@@ -957,11 +959,18 @@
 	     * typeahead buffer. */
 	    ++no_mapping;
 	    ++allow_keys;
+	    /* temporarily disable Recording. If Recording is active, the char
+	     * will be recorded later, since the character will be added to the
+	     * typebuf after the loop */
+	    Recording = FALSE;
+	    scriptout = NULL;
 	    c = safe_vgetc();
 	    if (had_got_int && !global_busy)
 		got_int = FALSE;
 	    --no_mapping;
 	    --allow_keys;
+	    Recording = had_Recording;
+	    scriptout = had_scriptout;
 
 #ifdef FEAT_CLIPBOARD
 	    /* Strange way to allow copying (yanking) a modeless selection at

Raspunde prin e-mail lui