]>
Commit | Line | Data |
---|---|---|
39a54fe5 AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 7.2.225 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 7.2.225 | |
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 | |
14 | ||
15 | ||
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 | |
18 | *************** | |
19 | *** 1309,1314 **** | |
20 | --- 1309,1317 ---- | |
21 | return OK; | |
22 | } | |
23 | ||
24 | + static int old_char = -1; /* character put back by vungetc() */ | |
25 | + static int old_mod_mask; /* mod_mask for ungotten character */ | |
26 | + | |
27 | #if defined(FEAT_EVAL) || defined(FEAT_EX_EXTRA) || defined(PROTO) | |
28 | ||
29 | /* | |
30 | *************** | |
31 | *** 1323,1328 **** | |
32 | --- 1326,1335 ---- | |
33 | if (!tp->typebuf_valid) | |
34 | typebuf = tp->save_typebuf; | |
35 | ||
36 | + tp->old_char = old_char; | |
37 | + tp->old_mod_mask = old_mod_mask; | |
38 | + old_char = -1; | |
39 | + | |
40 | tp->save_stuffbuff = stuffbuff; | |
41 | stuffbuff.bh_first.b_next = NULL; | |
42 | # ifdef USE_INPUT_BUF | |
43 | *************** | |
44 | *** 1344,1349 **** | |
45 | --- 1351,1359 ---- | |
46 | typebuf = tp->save_typebuf; | |
47 | } | |
48 | ||
49 | + old_char = tp->old_char; | |
50 | + old_mod_mask = tp->old_mod_mask; | |
51 | + | |
52 | free_buff(&stuffbuff); | |
53 | stuffbuff = tp->save_stuffbuff; | |
54 | # ifdef USE_INPUT_BUF | |
55 | *************** | |
56 | *** 1499,1507 **** | |
57 | #define KL_PART_KEY -1 /* keylen value for incomplete key-code */ | |
58 | #define KL_PART_MAP -2 /* keylen value for incomplete mapping */ | |
59 | ||
60 | - static int old_char = -1; /* character put back by vungetc() */ | |
61 | - static int old_mod_mask; /* mod_mask for ungotten character */ | |
62 | - | |
63 | /* | |
64 | * Get the next input character. | |
65 | * Can return a special key or a multi-byte character. | |
66 | --- 1509,1514 ---- | |
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 | |
69 | *************** | |
70 | *** 882,887 **** | |
71 | --- 882,889 ---- | |
72 | { | |
73 | typebuf_T save_typebuf; | |
74 | int typebuf_valid; /* TRUE when save_typebuf valid */ | |
75 | + int old_char; | |
76 | + int old_mod_mask; | |
77 | struct buffheader save_stuffbuff; | |
78 | #ifdef USE_INPUT_BUF | |
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 | |
82 | *************** | |
83 | *** 678,679 **** | |
84 | --- 678,681 ---- | |
85 | { /* Add new patch number below this line */ | |
86 | + /**/ | |
87 | + 225, | |
88 | /**/ | |
89 | ||
90 | -- | |
91 | hundred-and-one symptoms of being an internet addict: | |
92 | 78. You find yourself dialing IP numbers on the phone. | |
93 | ||
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 /// |