Karsten Hopp cbcaf7
To: vim_dev@googlegroups.com
Karsten Hopp cbcaf7
Subject: Patch 7.4.205
Karsten Hopp cbcaf7
Fcc: outbox
Karsten Hopp cbcaf7
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp cbcaf7
Mime-Version: 1.0
Karsten Hopp cbcaf7
Content-Type: text/plain; charset=UTF-8
Karsten Hopp cbcaf7
Content-Transfer-Encoding: 8bit
Karsten Hopp cbcaf7
------------
Karsten Hopp cbcaf7
Karsten Hopp cbcaf7
Patch 7.4.205
Karsten Hopp cbcaf7
Problem:    ":mksession" writes command to move to second argument while it
Karsten Hopp cbcaf7
	    does not exist.  When it does exist the order might be wrong.
Karsten Hopp cbcaf7
Solution:   Use ":argadd" for each argument instead of using ":args" with a
Karsten Hopp cbcaf7
	    list of names. (Nobuhiro Takasaki)
Karsten Hopp cbcaf7
Files:	    src/ex_docmd.c
Karsten Hopp cbcaf7
Karsten Hopp cbcaf7
Karsten Hopp cbcaf7
*** ../vim-7.4.204/src/ex_docmd.c	2014-02-05 22:46:49.058587842 +0100
Karsten Hopp cbcaf7
--- src/ex_docmd.c	2014-03-12 21:08:35.361028825 +0100
Karsten Hopp cbcaf7
***************
Karsten Hopp cbcaf7
*** 10381,10387 ****
Karsten Hopp cbcaf7
      }
Karsten Hopp cbcaf7
  
Karsten Hopp cbcaf7
      /* the global argument list */
Karsten Hopp cbcaf7
!     if (ses_arglist(fd, "args", &global_alist.al_ga,
Karsten Hopp cbcaf7
  			    !(ssop_flags & SSOP_CURDIR), &ssop_flags) == FAIL)
Karsten Hopp cbcaf7
  	return FAIL;
Karsten Hopp cbcaf7
  
Karsten Hopp cbcaf7
--- 10381,10387 ----
Karsten Hopp cbcaf7
      }
Karsten Hopp cbcaf7
  
Karsten Hopp cbcaf7
      /* the global argument list */
Karsten Hopp cbcaf7
!     if (ses_arglist(fd, "argglobal", &global_alist.al_ga,
Karsten Hopp cbcaf7
  			    !(ssop_flags & SSOP_CURDIR), &ssop_flags) == FAIL)
Karsten Hopp cbcaf7
  	return FAIL;
Karsten Hopp cbcaf7
  
Karsten Hopp cbcaf7
***************
Karsten Hopp cbcaf7
*** 10955,10963 ****
Karsten Hopp cbcaf7
      char_u	*buf = NULL;
Karsten Hopp cbcaf7
      char_u	*s;
Karsten Hopp cbcaf7
  
Karsten Hopp cbcaf7
!     if (gap->ga_len == 0)
Karsten Hopp cbcaf7
! 	return put_line(fd, "silent! argdel *");
Karsten Hopp cbcaf7
!     if (fputs(cmd, fd) < 0)
Karsten Hopp cbcaf7
  	return FAIL;
Karsten Hopp cbcaf7
      for (i = 0; i < gap->ga_len; ++i)
Karsten Hopp cbcaf7
      {
Karsten Hopp cbcaf7
--- 10955,10963 ----
Karsten Hopp cbcaf7
      char_u	*buf = NULL;
Karsten Hopp cbcaf7
      char_u	*s;
Karsten Hopp cbcaf7
  
Karsten Hopp cbcaf7
!     if (fputs(cmd, fd) < 0 || put_eol(fd) == FAIL)
Karsten Hopp cbcaf7
! 	return FAIL;
Karsten Hopp cbcaf7
!     if (put_line(fd, "silent! argdel *") == FAIL)
Karsten Hopp cbcaf7
  	return FAIL;
Karsten Hopp cbcaf7
      for (i = 0; i < gap->ga_len; ++i)
Karsten Hopp cbcaf7
      {
Karsten Hopp cbcaf7
***************
Karsten Hopp cbcaf7
*** 10974,10980 ****
Karsten Hopp cbcaf7
  		    s = buf;
Karsten Hopp cbcaf7
  		}
Karsten Hopp cbcaf7
  	    }
Karsten Hopp cbcaf7
! 	    if (fputs(" ", fd) < 0 || ses_put_fname(fd, s, flagp) == FAIL)
Karsten Hopp cbcaf7
  	    {
Karsten Hopp cbcaf7
  		vim_free(buf);
Karsten Hopp cbcaf7
  		return FAIL;
Karsten Hopp cbcaf7
--- 10974,10982 ----
Karsten Hopp cbcaf7
  		    s = buf;
Karsten Hopp cbcaf7
  		}
Karsten Hopp cbcaf7
  	    }
Karsten Hopp cbcaf7
! 	    if (fputs("argadd ", fd) < 0
Karsten Hopp cbcaf7
! 		    || ses_put_fname(fd, s, flagp) == FAIL
Karsten Hopp cbcaf7
! 		    || put_eol(fd) == FAIL)
Karsten Hopp cbcaf7
  	    {
Karsten Hopp cbcaf7
  		vim_free(buf);
Karsten Hopp cbcaf7
  		return FAIL;
Karsten Hopp cbcaf7
***************
Karsten Hopp cbcaf7
*** 10982,10988 ****
Karsten Hopp cbcaf7
  	    vim_free(buf);
Karsten Hopp cbcaf7
  	}
Karsten Hopp cbcaf7
      }
Karsten Hopp cbcaf7
!     return put_eol(fd);
Karsten Hopp cbcaf7
  }
Karsten Hopp cbcaf7
  
Karsten Hopp cbcaf7
  /*
Karsten Hopp cbcaf7
--- 10984,10990 ----
Karsten Hopp cbcaf7
  	    vim_free(buf);
Karsten Hopp cbcaf7
  	}
Karsten Hopp cbcaf7
      }
Karsten Hopp cbcaf7
!     return OK;
Karsten Hopp cbcaf7
  }
Karsten Hopp cbcaf7
  
Karsten Hopp cbcaf7
  /*
Karsten Hopp cbcaf7
*** ../vim-7.4.204/src/version.c	2014-03-12 20:17:47.752982126 +0100
Karsten Hopp cbcaf7
--- src/version.c	2014-03-12 21:09:16.273029451 +0100
Karsten Hopp cbcaf7
***************
Karsten Hopp cbcaf7
*** 740,741 ****
Karsten Hopp cbcaf7
--- 740,743 ----
Karsten Hopp cbcaf7
  {   /* Add new patch number below this line */
Karsten Hopp cbcaf7
+ /**/
Karsten Hopp cbcaf7
+     205,
Karsten Hopp cbcaf7
  /**/
Karsten Hopp cbcaf7
Karsten Hopp cbcaf7
-- 
Karsten Hopp cbcaf7
A law to reduce crime states: "It is mandatory for a motorist with criminal
Karsten Hopp cbcaf7
intentions to stop at the city limits and telephone the chief of police as he
Karsten Hopp cbcaf7
is entering the town.
Karsten Hopp cbcaf7
		[real standing law in Washington, United States of America]
Karsten Hopp cbcaf7
Karsten Hopp cbcaf7
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp cbcaf7
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp cbcaf7
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp cbcaf7
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///