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