4 From: Bram Moolenaar <Bram@moolenaar.net>
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
11 Problem: The register executed by @@ isn't restored.
12 Solution: Mark the executable register in the viminfo file.
16 *** ../vim-7.2.189/src/ops.c 2009-05-13 12:46:36.000000000 +0200
17 --- src/ops.c 2009-05-26 18:05:23.000000000 +0200
24 + static int execreg_lastc = NUL;
27 * execute a yank register: copy it into the stuff buffer
31 int addcr; /* always add '\n' to end of line */
32 int silent; /* set "silent" flag in typeahead buffer */
34 - static int lastc = NUL;
42 if (regname == '@') /* repeat previous one */
46 EMSG(_("E748: No previously used register"));
51 /* check for valid regname */
52 if (regname == '%' || regname == '#' || !valid_yank_reg(regname, FALSE))
55 if (regname == '@') /* repeat previous one */
57 ! if (execreg_lastc == NUL)
59 EMSG(_("E748: No previously used register"));
62 ! regname = execreg_lastc;
64 /* check for valid regname */
65 if (regname == '%' || regname == '#' || !valid_yank_reg(regname, FALSE))
74 regname = may_get_selection(regname);
79 ! execreg_lastc = regname;
82 regname = may_get_selection(regname);
87 /* We only get here (hopefully) if line[0] == '"' */
88 str = virp->vir_line + 1;
90 + /* If the line starts with "" this is the y_previous register. */
97 if (!ASCII_ISALNUM(*str) && *str != '-')
99 if (viminfo_error("E577: ", _("Illegal register name"), virp->vir_line))
103 get_yank_register(*str++, FALSE);
104 if (!force && y_current->y_array != NULL)
109 + /* "x@: register x used for @@ */
110 + if (force || execreg_lastc == NUL)
111 + execreg_lastc = str[-1];
115 limit = 100; /* Optimized for registers containing <= 100 lines */
119 vim_free(y_current->y_array);
120 array = y_current->y_array =
121 (char_u **)alloc((unsigned)(limit * sizeof(char_u *)));
122 ! str = skipwhite(str);
123 if (STRNCMP(str, "CHAR", 4) == 0)
124 y_current->y_type = MCHAR;
127 vim_free(y_current->y_array);
128 array = y_current->y_array =
129 (char_u **)alloc((unsigned)(limit * sizeof(char_u *)));
130 ! str = skipwhite(skiptowhite(str));
131 if (STRNCMP(str, "CHAR", 4) == 0)
132 y_current->y_type = MCHAR;
137 max_kbyte = get_viminfo_parameter('s');
141 for (i = 0; i < NUM_REGISTERS; i++)
143 if (y_regs[i].y_array == NULL)
146 if (y_previous == &y_regs[i])
148 c = get_register_name(i);
149 ! fprintf(fp, "\"%c\t%s\t%d\n", c, type,
151 (int)y_regs[i].y_width
154 if (y_previous == &y_regs[i])
156 c = get_register_name(i);
157 ! fprintf(fp, "\"%c", c);
158 ! if (c == execreg_lastc)
160 ! fprintf(fp, "\t%s\t%d\n", type,
162 (int)y_regs[i].y_width
164 *** ../vim-7.2.189/src/version.c 2009-05-26 11:01:43.000000000 +0200
165 --- src/version.c 2009-05-26 18:10:13.000000000 +0200
169 { /* Add new patch number below this line */
175 If you had to identify, in one word, the reason why the
176 human race has not achieved, and never will achieve, its
177 full potential, that word would be "meetings."
179 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
180 /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
181 \\\ download, build and distribute -- http://www.A-A-P.org ///
182 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///