3ef2ca
To: vim_dev@googlegroups.com
3ef2ca
Subject: Patch 7.4.592
3ef2ca
Fcc: outbox
3ef2ca
From: Bram Moolenaar <Bram@moolenaar.net>
3ef2ca
Mime-Version: 1.0
3ef2ca
Content-Type: text/plain; charset=UTF-8
3ef2ca
Content-Transfer-Encoding: 8bit
3ef2ca
------------
3ef2ca
3ef2ca
Patch 7.4.592
3ef2ca
Problem:    When doing ":e foobar" when already editing "foobar" and 'buftype'
3ef2ca
	    is "nofile" the buffer is cleared. (Xavier de Gaye)
3ef2ca
Solution:   Do no clear the buffer.
3ef2ca
Files:	    src/ex_cmds.c
3ef2ca
3ef2ca
3ef2ca
*** ../vim-7.4.591/src/ex_cmds.c	2014-12-13 03:17:07.461046575 +0100
3ef2ca
--- src/ex_cmds.c	2015-01-27 11:21:14.752434647 +0100
3ef2ca
***************
3ef2ca
*** 3529,3534 ****
3ef2ca
--- 3529,3541 ----
3ef2ca
  #endif
3ef2ca
  		check_fname() == FAIL)
3ef2ca
  	    goto theend;
3ef2ca
+ 
3ef2ca
+ 	/* ":e foobar" when already editing "foobar" will reload the file.
3ef2ca
+ 	 * But when 'buftype' is "nofile" there is no file to load, so don't
3ef2ca
+ 	 * do anything. */
3ef2ca
+ 	if (curbuf->b_p_bt[0] == 'n' && curbuf->b_p_bt[2] == 'f')
3ef2ca
+ 	    goto theend;
3ef2ca
+ 
3ef2ca
  	oldbuf = (flags & ECMD_OLDBUF);
3ef2ca
      }
3ef2ca
  
3ef2ca
*** ../vim-7.4.591/src/version.c	2015-01-22 22:41:51.864583029 +0100
3ef2ca
--- src/version.c	2015-01-27 11:24:32.466265106 +0100
3ef2ca
***************
3ef2ca
*** 743,744 ****
3ef2ca
--- 743,746 ----
3ef2ca
  {   /* Add new patch number below this line */
3ef2ca
+ /**/
3ef2ca
+     592,
3ef2ca
  /**/
3ef2ca
3ef2ca
-- 
3ef2ca
hundred-and-one symptoms of being an internet addict:
3ef2ca
120. You ask a friend, "What's that big shiny thing?" He says, "It's the sun."
3ef2ca
3ef2ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
3ef2ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
3ef2ca
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
3ef2ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///