Karsten Hopp 78bfc2
To: vim_dev@googlegroups.com
Karsten Hopp 78bfc2
Subject: Patch 7.3.646
Karsten Hopp 78bfc2
Fcc: outbox
Karsten Hopp 78bfc2
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 78bfc2
Mime-Version: 1.0
Karsten Hopp 78bfc2
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 78bfc2
Content-Transfer-Encoding: 8bit
Karsten Hopp 78bfc2
------------
Karsten Hopp 78bfc2
Karsten Hopp 78bfc2
Patch 7.3.646
Karsten Hopp 78bfc2
Problem:    When reloading a buffer the undo file becomes unusable unless ":w"
Karsten Hopp 78bfc2
	    is executed. (Dmitri Frank)
Karsten Hopp 78bfc2
Solution:   After reloading the buffer write the undo file. (Christian
Karsten Hopp 78bfc2
	    Brabandt)
Karsten Hopp 78bfc2
Files:	    src/fileio.c
Karsten Hopp 78bfc2
Karsten Hopp 78bfc2
Karsten Hopp 78bfc2
*** ../vim-7.3.645/src/fileio.c	2012-07-10 17:14:50.000000000 +0200
Karsten Hopp 78bfc2
--- src/fileio.c	2012-08-29 18:19:44.000000000 +0200
Karsten Hopp 78bfc2
***************
Karsten Hopp 78bfc2
*** 7060,7067 ****
Karsten Hopp 78bfc2
--- 7060,7082 ----
Karsten Hopp 78bfc2
      }
Karsten Hopp 78bfc2
  
Karsten Hopp 78bfc2
      if (reload)
Karsten Hopp 78bfc2
+     {
Karsten Hopp 78bfc2
  	/* Reload the buffer. */
Karsten Hopp 78bfc2
  	buf_reload(buf, orig_mode);
Karsten Hopp 78bfc2
+ #ifdef FEAT_PERSISTENT_UNDO
Karsten Hopp 78bfc2
+ 	if (buf->b_p_udf && buf->b_ffname != NULL)
Karsten Hopp 78bfc2
+ 	{
Karsten Hopp 78bfc2
+ 	    char_u	    hash[UNDO_HASH_SIZE];
Karsten Hopp 78bfc2
+ 	    buf_T	    *save_curbuf = curbuf;
Karsten Hopp 78bfc2
+ 
Karsten Hopp 78bfc2
+ 	    /* Any existing undo file is unusable, write it now. */
Karsten Hopp 78bfc2
+ 	    curbuf = buf;
Karsten Hopp 78bfc2
+ 	    u_compute_hash(hash);
Karsten Hopp 78bfc2
+ 	    u_write_undo(NULL, FALSE, buf, hash);
Karsten Hopp 78bfc2
+ 	    curbuf = save_curbuf;
Karsten Hopp 78bfc2
+ 	}
Karsten Hopp 78bfc2
+ #endif
Karsten Hopp 78bfc2
+     }
Karsten Hopp 78bfc2
  
Karsten Hopp 78bfc2
  #ifdef FEAT_AUTOCMD
Karsten Hopp 78bfc2
      /* Trigger FileChangedShell when the file was changed in any way. */
Karsten Hopp 78bfc2
*** ../vim-7.3.645/src/version.c	2012-08-29 16:55:09.000000000 +0200
Karsten Hopp 78bfc2
--- src/version.c	2012-08-29 18:21:07.000000000 +0200
Karsten Hopp 78bfc2
***************
Karsten Hopp 78bfc2
*** 721,722 ****
Karsten Hopp 78bfc2
--- 721,724 ----
Karsten Hopp 78bfc2
  {   /* Add new patch number below this line */
Karsten Hopp 78bfc2
+ /**/
Karsten Hopp 78bfc2
+     646,
Karsten Hopp 78bfc2
  /**/
Karsten Hopp 78bfc2
Karsten Hopp 78bfc2
-- 
Karsten Hopp 78bfc2
   An extraordinary TALL KNIGHT in all black (possibly John with Mike on his
Karsten Hopp 78bfc2
   shoulders) walks out from the dark trees.  He is extremely fierce and
Karsten Hopp 78bfc2
   gruesome countenance.  He walks towards KING ARTHUR and PATSY, who are
Karsten Hopp 78bfc2
   wazzing like mad.  (Salopian slang, meaning very scared.  almost to the
Karsten Hopp 78bfc2
   point of wetting oneself, e.g. before an important football match or
Karsten Hopp 78bfc2
   prior to a postering.  Salopian slang meaning a beating by the school
Karsten Hopp 78bfc2
   praeposters.  Sorry about the Salopian slant to this stage direction - Ed.)
Karsten Hopp 78bfc2
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp 78bfc2
Karsten Hopp 78bfc2
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 78bfc2
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 78bfc2
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 78bfc2
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///