Karsten Hopp 52b0ca
To: vim_dev@googlegroups.com
Karsten Hopp 52b0ca
Subject: Patch 7.3.048
Karsten Hopp 52b0ca
Fcc: outbox
Karsten Hopp 52b0ca
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 52b0ca
Mime-Version: 1.0
Karsten Hopp 52b0ca
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 52b0ca
Content-Transfer-Encoding: 8bit
Karsten Hopp 52b0ca
------------
Karsten Hopp 52b0ca
Karsten Hopp 52b0ca
Patch 7.3.048
Karsten Hopp 52b0ca
Problem:    ":earlier 1f" doesn't work after loading undo file.
Karsten Hopp 52b0ca
Solution:   Set b_u_save_nr_cur when loading an undo file. (Christian
Karsten Hopp 52b0ca
	    Brabandt)
Karsten Hopp 52b0ca
	    Fix only showing time in ":undolist"
Karsten Hopp 52b0ca
Files:	    src/undo.c
Karsten Hopp 52b0ca
Karsten Hopp 52b0ca
Karsten Hopp 52b0ca
*** ../vim-7.3.047/src/undo.c	2010-08-15 21:57:28.000000000 +0200
Karsten Hopp 52b0ca
--- src/undo.c	2010-11-03 19:26:38.000000000 +0100
Karsten Hopp 52b0ca
***************
Karsten Hopp 52b0ca
*** 1861,1866 ****
Karsten Hopp 52b0ca
--- 1861,1867 ----
Karsten Hopp 52b0ca
      curbuf->b_u_seq_cur = seq_cur;
Karsten Hopp 52b0ca
      curbuf->b_u_time_cur = seq_time;
Karsten Hopp 52b0ca
      curbuf->b_u_save_nr_last = last_save_nr;
Karsten Hopp 52b0ca
+     curbuf->b_u_save_nr_cur = last_save_nr;
Karsten Hopp 52b0ca
  
Karsten Hopp 52b0ca
      curbuf->b_u_synced = TRUE;
Karsten Hopp 52b0ca
      vim_free(uhp_table);
Karsten Hopp 52b0ca
***************
Karsten Hopp 52b0ca
*** 2794,2800 ****
Karsten Hopp 52b0ca
  								uhp->uh_time);
Karsten Hopp 52b0ca
  	    if (uhp->uh_save_nr > 0)
Karsten Hopp 52b0ca
  	    {
Karsten Hopp 52b0ca
! 		while (STRLEN(IObuff) < 32)
Karsten Hopp 52b0ca
  		    STRCAT(IObuff, " ");
Karsten Hopp 52b0ca
  		vim_snprintf_add((char *)IObuff, IOSIZE,
Karsten Hopp 52b0ca
  						   "  %3ld", uhp->uh_save_nr);
Karsten Hopp 52b0ca
--- 2795,2801 ----
Karsten Hopp 52b0ca
  								uhp->uh_time);
Karsten Hopp 52b0ca
  	    if (uhp->uh_save_nr > 0)
Karsten Hopp 52b0ca
  	    {
Karsten Hopp 52b0ca
! 		while (STRLEN(IObuff) < 33)
Karsten Hopp 52b0ca
  		    STRCAT(IObuff, " ");
Karsten Hopp 52b0ca
  		vim_snprintf_add((char *)IObuff, IOSIZE,
Karsten Hopp 52b0ca
  						   "  %3ld", uhp->uh_save_nr);
Karsten Hopp 52b0ca
***************
Karsten Hopp 52b0ca
*** 2849,2855 ****
Karsten Hopp 52b0ca
  	sort_strings((char_u **)ga.ga_data, ga.ga_len);
Karsten Hopp 52b0ca
  
Karsten Hopp 52b0ca
  	msg_start();
Karsten Hopp 52b0ca
! 	msg_puts_attr((char_u *)_("number changes  time            saved"),
Karsten Hopp 52b0ca
  							      hl_attr(HLF_T));
Karsten Hopp 52b0ca
  	for (i = 0; i < ga.ga_len && !got_int; ++i)
Karsten Hopp 52b0ca
  	{
Karsten Hopp 52b0ca
--- 2850,2856 ----
Karsten Hopp 52b0ca
  	sort_strings((char_u **)ga.ga_data, ga.ga_len);
Karsten Hopp 52b0ca
  
Karsten Hopp 52b0ca
  	msg_start();
Karsten Hopp 52b0ca
! 	msg_puts_attr((char_u *)_("number changes  when               saved"),
Karsten Hopp 52b0ca
  							      hl_attr(HLF_T));
Karsten Hopp 52b0ca
  	for (i = 0; i < ga.ga_len && !got_int; ++i)
Karsten Hopp 52b0ca
  	{
Karsten Hopp 52b0ca
***************
Karsten Hopp 52b0ca
*** 2879,2885 ****
Karsten Hopp 52b0ca
      if (time(NULL) - tt >= 100)
Karsten Hopp 52b0ca
      {
Karsten Hopp 52b0ca
  	curtime = localtime(&tt;;
Karsten Hopp 52b0ca
! 	(void)strftime((char *)buf, buflen, "%H:%M:%S", curtime);
Karsten Hopp 52b0ca
      }
Karsten Hopp 52b0ca
      else
Karsten Hopp 52b0ca
  #endif
Karsten Hopp 52b0ca
--- 2880,2894 ----
Karsten Hopp 52b0ca
      if (time(NULL) - tt >= 100)
Karsten Hopp 52b0ca
      {
Karsten Hopp 52b0ca
  	curtime = localtime(&tt;;
Karsten Hopp 52b0ca
! 	if (time(NULL) - tt < (60L * 60L * 12L))
Karsten Hopp 52b0ca
! 	    /* within 12 hours */
Karsten Hopp 52b0ca
! 	    (void)strftime((char *)buf, buflen, "%H:%M:%S", curtime);
Karsten Hopp 52b0ca
! 	else if (time(NULL) - tt < (60L * 60L * 24L * 180L))
Karsten Hopp 52b0ca
! 	    /* within 6 months */
Karsten Hopp 52b0ca
! 	    (void)strftime((char *)buf, buflen, "%m/%d %H:%M:%S", curtime);
Karsten Hopp 52b0ca
! 	else
Karsten Hopp 52b0ca
! 	    /* long ago */
Karsten Hopp 52b0ca
! 	    (void)strftime((char *)buf, buflen, "%y/%m/%d %H:%M:%S", curtime);
Karsten Hopp 52b0ca
      }
Karsten Hopp 52b0ca
      else
Karsten Hopp 52b0ca
  #endif
Karsten Hopp 52b0ca
*** ../vim-7.3.047/src/version.c	2010-10-27 18:36:32.000000000 +0200
Karsten Hopp 52b0ca
--- src/version.c	2010-11-03 19:27:07.000000000 +0100
Karsten Hopp 52b0ca
***************
Karsten Hopp 52b0ca
*** 716,717 ****
Karsten Hopp 52b0ca
--- 716,719 ----
Karsten Hopp 52b0ca
  {   /* Add new patch number below this line */
Karsten Hopp 52b0ca
+ /**/
Karsten Hopp 52b0ca
+     48,
Karsten Hopp 52b0ca
  /**/
Karsten Hopp 52b0ca
Karsten Hopp 52b0ca
-- 
Karsten Hopp 52b0ca
TIM: To the north there lies a cave,  the cave of Caerbannog, wherein, carved
Karsten Hopp 52b0ca
     in mystic runes, upon the very living rock, the last words of Olfin
Karsten Hopp 52b0ca
     Bedwere of Rheged make plain the last resting place of the most Holy
Karsten Hopp 52b0ca
     Grail.
Karsten Hopp 52b0ca
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp 52b0ca
Karsten Hopp 52b0ca
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 52b0ca
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 52b0ca
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 52b0ca
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///