summaryrefslogtreecommitdiffstats
path: root/source/ap/vim/patches/7.2.190
diff options
context:
space:
mode:
author Patrick J Volkerding <volkerdi@slackware.com>2009-08-26 10:00:38 -0500
committer Eric Hameleers <alien@slackware.com>2018-05-31 22:41:17 +0200
commit5a12e7c134274dba706667107d10d231517d3e05 (patch)
tree55718d5acb710fde798d9f38d0bbaf594ed4b296 /source/ap/vim/patches/7.2.190
downloadcurrent-5a12e7c134274dba706667107d10d231517d3e05.tar.gz
current-5a12e7c134274dba706667107d10d231517d3e05.tar.xz
Slackware 13.0slackware-13.0
Wed Aug 26 10:00:38 CDT 2009 Slackware 13.0 x86_64 is released as stable! Thanks to everyone who helped make this release possible -- see the RELEASE_NOTES for the credits. The ISOs are off to the replicator. This time it will be a 6 CD-ROM 32-bit set and a dual-sided 32-bit/64-bit x86/x86_64 DVD. We're taking pre-orders now at store.slackware.com. Please consider picking up a copy to help support the project. Once again, thanks to the entire Slackware community for all the help testing and fixing things and offering suggestions during this development cycle. As always, have fun and enjoy! -P.
Diffstat (limited to 'source/ap/vim/patches/7.2.190')
-rw-r--r--source/ap/vim/patches/7.2.190182
1 files changed, 182 insertions, 0 deletions
diff --git a/source/ap/vim/patches/7.2.190 b/source/ap/vim/patches/7.2.190
new file mode 100644
index 000000000..2a0aee98e
--- /dev/null
+++ b/source/ap/vim/patches/7.2.190
@@ -0,0 +1,182 @@
+To: vim-dev@vim.org
+Subject: Patch 7.2.190
+Fcc: outbox
+From: Bram Moolenaar <Bram@moolenaar.net>
+Mime-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+------------
+
+Patch 7.2.190
+Problem: The register executed by @@ isn't restored.
+Solution: Mark the executable register in the viminfo file.
+Files: src/ops.c
+
+
+*** ../vim-7.2.189/src/ops.c 2009-05-13 12:46:36.000000000 +0200
+--- src/ops.c 2009-05-26 18:05:23.000000000 +0200
+***************
+*** 1143,1148 ****
+--- 1143,1150 ----
+ return OK;
+ }
+
++ static int execreg_lastc = NUL;
++
+ /*
+ * execute a yank register: copy it into the stuff buffer
+ *
+***************
+*** 1155,1161 ****
+ int addcr; /* always add '\n' to end of line */
+ int silent; /* set "silent" flag in typeahead buffer */
+ {
+- static int lastc = NUL;
+ long i;
+ char_u *p;
+ int retval = OK;
+--- 1157,1162 ----
+***************
+*** 1163,1174 ****
+
+ if (regname == '@') /* repeat previous one */
+ {
+! if (lastc == NUL)
+ {
+ EMSG(_("E748: No previously used register"));
+ return FAIL;
+ }
+! regname = lastc;
+ }
+ /* check for valid regname */
+ if (regname == '%' || regname == '#' || !valid_yank_reg(regname, FALSE))
+--- 1164,1175 ----
+
+ if (regname == '@') /* repeat previous one */
+ {
+! if (execreg_lastc == NUL)
+ {
+ EMSG(_("E748: No previously used register"));
+ return FAIL;
+ }
+! regname = execreg_lastc;
+ }
+ /* check for valid regname */
+ if (regname == '%' || regname == '#' || !valid_yank_reg(regname, FALSE))
+***************
+*** 1176,1182 ****
+ emsg_invreg(regname);
+ return FAIL;
+ }
+! lastc = regname;
+
+ #ifdef FEAT_CLIPBOARD
+ regname = may_get_selection(regname);
+--- 1177,1183 ----
+ emsg_invreg(regname);
+ return FAIL;
+ }
+! execreg_lastc = regname;
+
+ #ifdef FEAT_CLIPBOARD
+ regname = may_get_selection(regname);
+***************
+*** 5337,5347 ****
+--- 5338,5351 ----
+
+ /* We only get here (hopefully) if line[0] == '"' */
+ str = virp->vir_line + 1;
++
++ /* If the line starts with "" this is the y_previous register. */
+ if (*str == '"')
+ {
+ set_prev = TRUE;
+ str++;
+ }
++
+ if (!ASCII_ISALNUM(*str) && *str != '-')
+ {
+ if (viminfo_error("E577: ", _("Illegal register name"), virp->vir_line))
+***************
+*** 5351,5356 ****
+--- 5355,5368 ----
+ get_yank_register(*str++, FALSE);
+ if (!force && y_current->y_array != NULL)
+ do_it = FALSE;
++
++ if (*str == '@')
++ {
++ /* "x@: register x used for @@ */
++ if (force || execreg_lastc == NUL)
++ execreg_lastc = str[-1];
++ }
++
+ size = 0;
+ limit = 100; /* Optimized for registers containing <= 100 lines */
+ if (do_it)
+***************
+*** 5360,5366 ****
+ vim_free(y_current->y_array);
+ array = y_current->y_array =
+ (char_u **)alloc((unsigned)(limit * sizeof(char_u *)));
+! str = skipwhite(str);
+ if (STRNCMP(str, "CHAR", 4) == 0)
+ y_current->y_type = MCHAR;
+ #ifdef FEAT_VISUAL
+--- 5372,5378 ----
+ vim_free(y_current->y_array);
+ array = y_current->y_array =
+ (char_u **)alloc((unsigned)(limit * sizeof(char_u *)));
+! str = skipwhite(skiptowhite(str));
+ if (STRNCMP(str, "CHAR", 4) == 0)
+ y_current->y_type = MCHAR;
+ #ifdef FEAT_VISUAL
+***************
+*** 5443,5448 ****
+--- 5455,5461 ----
+ max_kbyte = get_viminfo_parameter('s');
+ if (max_kbyte == 0)
+ return;
++
+ for (i = 0; i < NUM_REGISTERS; i++)
+ {
+ if (y_regs[i].y_array == NULL)
+***************
+*** 5497,5503 ****
+ if (y_previous == &y_regs[i])
+ fprintf(fp, "\"");
+ c = get_register_name(i);
+! fprintf(fp, "\"%c\t%s\t%d\n", c, type,
+ #ifdef FEAT_VISUAL
+ (int)y_regs[i].y_width
+ #else
+--- 5510,5519 ----
+ if (y_previous == &y_regs[i])
+ fprintf(fp, "\"");
+ c = get_register_name(i);
+! fprintf(fp, "\"%c", c);
+! if (c == execreg_lastc)
+! fprintf(fp, "@");
+! fprintf(fp, "\t%s\t%d\n", type,
+ #ifdef FEAT_VISUAL
+ (int)y_regs[i].y_width
+ #else
+*** ../vim-7.2.189/src/version.c 2009-05-26 11:01:43.000000000 +0200
+--- src/version.c 2009-05-26 18:10:13.000000000 +0200
+***************
+*** 678,679 ****
+--- 678,681 ----
+ { /* Add new patch number below this line */
++ /**/
++ 190,
+ /**/
+
+--
+If you had to identify, in one word, the reason why the
+human race has not achieved, and never will achieve, its
+full potential, that word would be "meetings."
+
+ /// 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 ///