| To: vim-dev@vim.org |
| Subject: Patch 7.0.098 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| 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 |
| |
| |
| |
| |
| |
| *** 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; |
| } |
| |
| /* |
| |
| |
| |
| *** 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 |
| |
| |
| |
| *** 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 /// |