On Sun, 10 Sep 2006 at 9:07pm, Bram Moolenaar wrote: > > 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 >
The patch works great, thank you. -- Thanks, Hari > > *** ../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, > /**/ > > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com