To: vim-dev@vim.org Subject: patch 5.5.014 Fcc: outbox From: Bram Moolenaar ------------ Patch 5.5.014 Problem: When executing a register with ":@", the ":append" command would get text lines with a ':' prepended. (Heinlein) Solution: Remove the ':' characters. Files: src/ex_docmd.c, src/ex_getln.c, src/globals.h *** ../vim-5.5.13/src/ex_docmd.c Sat Oct 2 16:10:34 1999 --- src/ex_docmd.c Sat Oct 2 16:31:48 1999 *************** *** 6675,6686 **** beep_flush(); else { /* execute from the mapbuf */ while (vpeekc() == ':') - { - (void)vgetc(); (void)do_cmdline(NULL, getexline, NULL, DOCMD_NOWAIT|DOCMD_VERBOSE); ! } } } --- 6675,6688 ---- beep_flush(); else { + int save_efr = exec_from_reg; + + exec_from_reg = TRUE; /* execute from the mapbuf */ while (vpeekc() == ':') (void)do_cmdline(NULL, getexline, NULL, DOCMD_NOWAIT|DOCMD_VERBOSE); ! ! exec_from_reg = save_efr; } } *** ../vim-5.5.13/src/ex_getln.c Wed Sep 22 10:06:21 1999 --- src/ex_getln.c Sat Oct 2 16:27:42 1999 *************** *** 1360,1365 **** --- 1360,1368 ---- void *dummy; /* cookie not used */ int indent; /* indent for inside conditionals */ { + /* When executing a register, remove ':' that's in front of each line. */ + if (exec_from_reg && vpeekc() == ':') + (void)vgetc(); return getcmdline(c, 1L, indent); } *** ../vim-5.5.13/src/globals.h Wed Sep 22 10:06:19 1999 --- src/globals.h Sat Oct 2 16:32:39 1999 *************** *** 65,70 **** --- 65,72 ---- #ifdef CRYPTV EXTERN int cmdline_crypt INIT(= FALSE); /* cmdline is crypted */ #endif + EXTERN int exec_from_reg INIT(= FALSE); /* executing register */ + EXTERN int modified INIT(= FALSE); /* buffer was modified since last redraw */ EXTERN int tag_modified INIT(= FALSE); /* buffer was modified since *** ../vim-5.5.13/src/version.c Sat Oct 2 16:10:34 1999 --- src/version.c Sat Oct 2 16:40:03 1999 *************** *** 420,420 **** --- 420,421 ---- { /* Add new patch number below this line */ + 14, -- Women are probably the main cause of free software starvation. --/-/---- Bram Moolenaar ---- Bram@moolenaar.net ---- Bram@vim.org ---\-\-- \ \ www.vim.org/iccf www.moolenaar.net www.vim.org / /