4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: When using ":normal" a saved character may be executed.
12 Solution: Also store old_char when saving typeahead.
13 Files: src/getchar.c, src/structs.h
16 *** ../vim-7.2.224/src/getchar.c 2009-02-22 23:42:08.000000000 +0100
17 --- src/getchar.c 2009-07-09 18:09:13.000000000 +0200
24 + static int old_char = -1; /* character put back by vungetc() */
25 + static int old_mod_mask; /* mod_mask for ungotten character */
27 #if defined(FEAT_EVAL) || defined(FEAT_EX_EXTRA) || defined(PROTO)
33 if (!tp->typebuf_valid)
34 typebuf = tp->save_typebuf;
36 + tp->old_char = old_char;
37 + tp->old_mod_mask = old_mod_mask;
40 tp->save_stuffbuff = stuffbuff;
41 stuffbuff.bh_first.b_next = NULL;
46 typebuf = tp->save_typebuf;
49 + old_char = tp->old_char;
50 + old_mod_mask = tp->old_mod_mask;
52 free_buff(&stuffbuff);
53 stuffbuff = tp->save_stuffbuff;
57 #define KL_PART_KEY -1 /* keylen value for incomplete key-code */
58 #define KL_PART_MAP -2 /* keylen value for incomplete mapping */
60 - static int old_char = -1; /* character put back by vungetc() */
61 - static int old_mod_mask; /* mod_mask for ungotten character */
64 * Get the next input character.
65 * Can return a special key or a multi-byte character.
67 *** ../vim-7.2.224/src/structs.h 2009-06-16 16:01:34.000000000 +0200
68 --- src/structs.h 2009-07-09 18:09:20.000000000 +0200
73 typebuf_T save_typebuf;
74 int typebuf_valid; /* TRUE when save_typebuf valid */
77 struct buffheader save_stuffbuff;
79 char_u *save_inputbuf;
80 *** ../vim-7.2.224/src/version.c 2009-07-09 18:15:19.000000000 +0200
81 --- src/version.c 2009-07-09 18:21:56.000000000 +0200
85 { /* Add new patch number below this line */
91 hundred-and-one symptoms of being an internet addict:
92 78. You find yourself dialing IP numbers on the phone.
94 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
95 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
96 \\\ download, build and distribute -- http://www.A-A-P.org ///
97 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///