From a8e0e249324e2b355446a33e3a1c19e1b4257ca3 Mon Sep 17 00:00:00 2001 From: Karsten Hopp Date: Jan 28 2010 20:20:46 +0000 Subject: - patchlevel 346 --- diff --git a/7.2.346 b/7.2.346 new file mode 100644 index 0000000..479aac6 --- /dev/null +++ b/7.2.346 @@ -0,0 +1,110 @@ +To: vim-dev@vim.org +Subject: Patch 7.2.346 +Fcc: outbox +From: Bram Moolenaar +Mime-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +------------ + +Patch 7.2.346 +Problem: Repeating a command with @: causes a mapping to be applied twice. +Solution: Do not remap characters inserted in the typeahead buffer. (Kana + Natsuno) +Files: src/ops.c + + +*** ../vim-7.2.345/src/ops.c 2010-01-19 14:59:14.000000000 +0100 +--- src/ops.c 2010-01-19 13:04:46.000000000 +0100 +*************** +*** 1301,1310 **** + } + } + + static int + put_in_typebuf(s, esc, colon, silent) + char_u *s; +! int esc; /* Escape CSI characters */ + int colon; /* add ':' before the line */ + int silent; + { +--- 1301,1316 ---- + } + } + ++ /* ++ * Insert register contents "s" into the typeahead buffer, so that it will be ++ * executed again. ++ * When "esc" is TRUE it is to be taken literally: Escape CSI characters and ++ * no remapping. ++ */ + static int + put_in_typebuf(s, esc, colon, silent) + char_u *s; +! int esc; + int colon; /* add ':' before the line */ + int silent; + { +*************** +*** 1312,1318 **** + + put_reedit_in_typebuf(silent); + if (colon) +! retval = ins_typebuf((char_u *)"\n", REMAP_YES, 0, TRUE, silent); + if (retval == OK) + { + char_u *p; +--- 1318,1324 ---- + + put_reedit_in_typebuf(silent); + if (colon) +! retval = ins_typebuf((char_u *)"\n", REMAP_NONE, 0, TRUE, silent); + if (retval == OK) + { + char_u *p; +*************** +*** 1324,1335 **** + if (p == NULL) + retval = FAIL; + else +! retval = ins_typebuf(p, REMAP_YES, 0, TRUE, silent); + if (esc) + vim_free(p); + } + if (colon && retval == OK) +! retval = ins_typebuf((char_u *)":", REMAP_YES, 0, TRUE, silent); + return retval; + } + +--- 1330,1342 ---- + if (p == NULL) + retval = FAIL; + else +! retval = ins_typebuf(p, esc ? REMAP_NONE : REMAP_YES, +! 0, TRUE, silent); + if (esc) + vim_free(p); + } + if (colon && retval == OK) +! retval = ins_typebuf((char_u *)":", REMAP_NONE, 0, TRUE, silent); + return retval; + } + +*** ../vim-7.2.345/src/version.c 2010-01-27 15:57:17.000000000 +0100 +--- src/version.c 2010-01-27 16:25:55.000000000 +0100 +*************** +*** 683,684 **** +--- 683,686 ---- + { /* Add new patch number below this line */ ++ /**/ ++ 346, + /**/ + +-- +hundred-and-one symptoms of being an internet addict: +155. You forget to eat because you're too busy surfing the net. + + /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ +/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ +\\\ download, build and distribute -- http://www.A-A-P.org /// + \\\ help me help AIDS victims -- http://ICCF-Holland.org ///