To: vim-dev@vim.org Subject: Patch 6.2.403 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 6.2.403 Problem: ":@y" checks stdin if there are more commands to execute. This fails if stdin is not connected, e.g., when starting the GUI from KDE. (Ned Konz) Solution: Only check for a next command if there still is typeahead. Files: src/ex_docmd.c *** ../vim-6.2.402/src/ex_docmd.c Sat Mar 20 17:45:15 2004 --- src/ex_docmd.c Sat Mar 20 17:45:21 2004 *************** *** 7223,7238 **** 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); - /* In Ex mode need to quit when the typeahead is exhausted, - * otherwise input unexpectedly goes to the typeahead buffer and - * getexmodeline() can't get it with inchar(). */ - if (exmode_active && stuff_empty() && typebuf.tb_len == 0) - break; - } exec_from_reg = save_efr; } --- 7221,7235 ---- int save_efr = exec_from_reg; exec_from_reg = TRUE; ! ! /* ! * Execute from the typeahead buffer. ! * Originally this didn't check for the typeahead buffer to be empty, ! * thus could read more Ex commands from stdin. It's not clear why, ! * it is certainly unexpected. ! */ ! while ((!stuff_empty() || typebuf.tb_len > 0) && vpeekc() == ':') (void)do_cmdline(NULL, getexline, NULL, DOCMD_NOWAIT|DOCMD_VERBOSE); exec_from_reg = save_efr; } *** ../vim-6.2.402/src/version.c Thu Mar 25 19:29:55 2004 --- src/version.c Fri Mar 26 10:35:56 2004 *************** *** 639,640 **** --- 639,642 ---- { /* Add new patch number below this line */ + /**/ + 403, /**/ -- hundred-and-one symptoms of being an internet addict: 144. You eagerly await the update of the "Cool Site of the Day." /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ Project leader for A-A-P -- http://www.A-A-P.org /// \\\ Buy at Amazon and help AIDS victims -- http://ICCF.nl/click1.html ///