To: vim-dev@vim.org Subject: Patch 7.0.098 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.0.098 Problem: Redirecting command output in a cmdline completion function doesn't work. (Hari Krishna Dara) Solution: Enable redirection when redirection is started. Files: src/ex_docmd.c, src/ex_getln.c *** ../vim-7.0.097/src/ex_docmd.c Sun Sep 10 15:50:32 2006 --- src/ex_docmd.c Sun Sep 10 20:59:46 2006 *************** *** 8422,8427 **** --- 8422,8436 ---- else EMSG2(_(e_invarg2), eap->arg); } + + /* Make sure redirection is not off. Can happen for cmdline completion + * that indirectly invokes a command to catch its output. */ + if (redir_fd != NULL + #ifdef FEAT_EVAL + || redir_reg || redir_vname + #endif + ) + redir_off = FALSE; } /* *** ../vim-7.0.097/src/ex_getln.c Sat Sep 2 17:58:36 2006 --- src/ex_getln.c Sun Sep 10 21:04:57 2006 *************** *** 324,329 **** --- 324,332 ---- */ for (;;) { + redir_off = TRUE; /* Don't redirect the typed command. + Repeated, because a ":redir" inside + completion may switch it on. */ #ifdef USE_ON_FLY_SCROLL dont_scroll = FALSE; /* allow scrolling here */ #endif *** ../vim-7.0.097/src/version.c Sun Sep 10 15:50:32 2006 --- src/version.c Sun Sep 10 20:58:17 2006 *************** *** 668,669 **** --- 668,671 ---- { /* Add new patch number below this line */ + /**/ + 98, /**/ -- GUEST: He's killed the best man! SECOND GUEST: (holding a limp WOMAN) He's killed my auntie. FATHER: No, please! This is supposed to be a happy occasion! Let's not bicker and argue about who killed who ... "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD /// 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 ///