Blob Blame History Raw
To: vim_dev@googlegroups.com
Subject: Patch 7.3.048
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 7.3.048
Problem:    ":earlier 1f" doesn't work after loading undo file.
Solution:   Set b_u_save_nr_cur when loading an undo file. (Christian
	    Brabandt)
	    Fix only showing time in ":undolist"
Files:	    src/undo.c


*** ../vim-7.3.047/src/undo.c	2010-08-15 21:57:28.000000000 +0200
--- src/undo.c	2010-11-03 19:26:38.000000000 +0100
***************
*** 1861,1866 ****
--- 1861,1867 ----
      curbuf->b_u_seq_cur = seq_cur;
      curbuf->b_u_time_cur = seq_time;
      curbuf->b_u_save_nr_last = last_save_nr;
+     curbuf->b_u_save_nr_cur = last_save_nr;
  
      curbuf->b_u_synced = TRUE;
      vim_free(uhp_table);
***************
*** 2794,2800 ****
  								uhp->uh_time);
  	    if (uhp->uh_save_nr > 0)
  	    {
! 		while (STRLEN(IObuff) < 32)
  		    STRCAT(IObuff, " ");
  		vim_snprintf_add((char *)IObuff, IOSIZE,
  						   "  %3ld", uhp->uh_save_nr);
--- 2795,2801 ----
  								uhp->uh_time);
  	    if (uhp->uh_save_nr > 0)
  	    {
! 		while (STRLEN(IObuff) < 33)
  		    STRCAT(IObuff, " ");
  		vim_snprintf_add((char *)IObuff, IOSIZE,
  						   "  %3ld", uhp->uh_save_nr);
***************
*** 2849,2855 ****
  	sort_strings((char_u **)ga.ga_data, ga.ga_len);
  
  	msg_start();
! 	msg_puts_attr((char_u *)_("number changes  time            saved"),
  							      hl_attr(HLF_T));
  	for (i = 0; i < ga.ga_len && !got_int; ++i)
  	{
--- 2850,2856 ----
  	sort_strings((char_u **)ga.ga_data, ga.ga_len);
  
  	msg_start();
! 	msg_puts_attr((char_u *)_("number changes  when               saved"),
  							      hl_attr(HLF_T));
  	for (i = 0; i < ga.ga_len && !got_int; ++i)
  	{
***************
*** 2879,2885 ****
      if (time(NULL) - tt >= 100)
      {
  	curtime = localtime(&tt);
! 	(void)strftime((char *)buf, buflen, "%H:%M:%S", curtime);
      }
      else
  #endif
--- 2880,2894 ----
      if (time(NULL) - tt >= 100)
      {
  	curtime = localtime(&tt);
! 	if (time(NULL) - tt < (60L * 60L * 12L))
! 	    /* within 12 hours */
! 	    (void)strftime((char *)buf, buflen, "%H:%M:%S", curtime);
! 	else if (time(NULL) - tt < (60L * 60L * 24L * 180L))
! 	    /* within 6 months */
! 	    (void)strftime((char *)buf, buflen, "%m/%d %H:%M:%S", curtime);
! 	else
! 	    /* long ago */
! 	    (void)strftime((char *)buf, buflen, "%y/%m/%d %H:%M:%S", curtime);
      }
      else
  #endif
*** ../vim-7.3.047/src/version.c	2010-10-27 18:36:32.000000000 +0200
--- src/version.c	2010-11-03 19:27:07.000000000 +0100
***************
*** 716,717 ****
--- 716,719 ----
  {   /* Add new patch number below this line */
+ /**/
+     48,
  /**/

-- 
TIM: To the north there lies a cave,  the cave of Caerbannog, wherein, carved
     in mystic runes, upon the very living rock, the last words of Olfin
     Bedwere of Rheged make plain the last resting place of the most Holy
     Grail.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///