1 To: vim_dev@googlegroups.com
4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: When 'cpoptions' includes "E" "c0" in the first column is an
12 error. The redo register is then set to the errornous command.
13 Solution: Do not set the redo register if the command fails because of an
14 empty region. (Hideki Eiraku)
15 Files: src/getchar.c, src/normal.c, src/proto/getchar.pro
18 *** ../vim-7.3.428/src/getchar.c 2012-01-10 22:26:12.000000000 +0100
19 --- src/getchar.c 2012-02-05 01:05:09.000000000 +0100
27 + * Discard the contents of the redo buffer and restore the previous redo
35 + free_buff(&redobuff);
36 + redobuff = old_redobuff;
37 + old_redobuff.bh_first.b_next = NULL;
39 + while (read_stuff(TRUE) != NUL)
44 #if defined(FEAT_AUTOCMD) || defined(FEAT_EVAL) || defined(PROTO)
46 * Save redobuff and old_redobuff to save_redobuff and save_old_redobuff.
49 * Read a character from the redo buffer. Translates K_SPECIAL, CSI and
50 * multibyte characters.
51 * The redo buffer is left as it is.
52 ! * if init is TRUE, prepare for redo, return FAIL if nothing to redo, OK
54 ! * if old is TRUE, use old_redobuff instead of redobuff
57 read_redo(init, old_redo)
59 * Read a character from the redo buffer. Translates K_SPECIAL, CSI and
60 * multibyte characters.
61 * The redo buffer is left as it is.
62 ! * If init is TRUE, prepare for redo, return FAIL if nothing to redo, OK
64 ! * If old is TRUE, use old_redobuff instead of redobuff.
67 read_redo(init, old_redo)
68 *** ../vim-7.3.428/src/normal.c 2012-01-26 11:43:04.000000000 +0100
69 --- src/normal.c 2012-02-05 01:06:01.000000000 +0100
73 VIsual_reselect = FALSE; /* don't reselect now */
75 if (empty_region_error)
86 if (empty_region_error)
95 (void)op_yank(oap, FALSE, !gui_yank);
99 VIsual_reselect = FALSE; /* don't reselect now */
101 if (empty_region_error)
108 /* This is a new edit command, not a restart. Need to
114 if (empty_region_error)
126 #ifdef FEAT_VISUALEXTRA
127 if (empty_region_error)
134 /* This is a new edit command, not a restart. Need to
138 #ifdef FEAT_VISUALEXTRA
139 if (empty_region_error)
145 #ifdef FEAT_VISUALEXTRA
147 op_replace(oap, cap->nchar);
148 *** ../vim-7.3.428/src/proto/getchar.pro 2010-10-20 21:22:17.000000000 +0200
149 --- src/proto/getchar.pro 2012-02-05 01:05:20.000000000 +0100
152 char_u *get_inserted __ARGS((void));
153 int stuff_empty __ARGS((void));
154 void typeahead_noflush __ARGS((int c));
155 ! void flush_buffers __ARGS((int typeahead));
156 void ResetRedobuff __ARGS((void));
157 void saveRedobuff __ARGS((void));
158 void restoreRedobuff __ARGS((void));
159 void AppendToRedobuff __ARGS((char_u *s));
161 char_u *get_inserted __ARGS((void));
162 int stuff_empty __ARGS((void));
163 void typeahead_noflush __ARGS((int c));
164 ! void flush_buffers __ARGS((int flush_typeahead));
165 void ResetRedobuff __ARGS((void));
166 + void CancelRedo __ARGS((void));
167 void saveRedobuff __ARGS((void));
168 void restoreRedobuff __ARGS((void));
169 void AppendToRedobuff __ARGS((char_u *s));
170 *** ../vim-7.3.428/src/version.c 2012-02-05 00:47:56.000000000 +0100
171 --- src/version.c 2012-02-05 01:09:23.000000000 +0100
175 { /* Add new patch number below this line */
181 The History of every major Galactic Civilization tends to pass through
182 three distinct and recognizable phases, those of Survival, Inquiry and
183 Sophistication, otherwise known as the How, Why and Where phases.
184 For instance, the first phase is characterized by the question 'How can
185 we eat?' the second by the question 'Why do we eat?' and the third by
186 the question 'Where shall we have lunch?'
187 -- Douglas Adams, "The Hitchhiker's Guide to the Galaxy"
189 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
190 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
191 \\\ an exciting new programming language -- http://www.Zimbu.org ///
192 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///