Karsten Hopp 3ca42e
To: vim-dev@vim.org
Karsten Hopp 3ca42e
Subject: patch 7.0.189
Karsten Hopp 3ca42e
Fcc: outbox
Karsten Hopp 3ca42e
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 3ca42e
Mime-Version: 1.0
Karsten Hopp 3ca42e
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 3ca42e
Content-Transfer-Encoding: 8bit
Karsten Hopp 3ca42e
------------
Karsten Hopp 3ca42e
Karsten Hopp 3ca42e
Patch 7.0.189
Karsten Hopp 3ca42e
Problem:    Translated message about finding matches is truncated.  (Yukihiro
Karsten Hopp 3ca42e
            Nakadaira)
Karsten Hopp 3ca42e
Solution:   Enlarge the buffer.  Also use vim_snprintf().
Karsten Hopp 3ca42e
Files:      src/edit.c
Karsten Hopp 3ca42e
Karsten Hopp 3ca42e
Karsten Hopp 3ca42e
*** ../vim-7.0.188/src/edit.c	Wed Nov  1 21:24:58 2006
Karsten Hopp 3ca42e
--- src/edit.c	Fri Jan 19 20:22:09 2007
Karsten Hopp 3ca42e
***************
Karsten Hopp 3ca42e
*** 4970,4985 ****
Karsten Hopp 3ca42e
  	     * just a safety check. */
Karsten Hopp 3ca42e
  	    if (compl_curr_match->cp_number != -1)
Karsten Hopp 3ca42e
  	    {
Karsten Hopp 3ca42e
! 		/* Space for 10 text chars. + 2x10-digit no.s */
Karsten Hopp 3ca42e
! 		static char_u match_ref[31];
Karsten Hopp 3ca42e
  
Karsten Hopp 3ca42e
  		if (compl_matches > 0)
Karsten Hopp 3ca42e
! 		    sprintf((char *)IObuff, _("match %d of %d"),
Karsten Hopp 3ca42e
  				compl_curr_match->cp_number, compl_matches);
Karsten Hopp 3ca42e
  		else
Karsten Hopp 3ca42e
! 		    sprintf((char *)IObuff, _("match %d"),
Karsten Hopp 3ca42e
! 						 compl_curr_match->cp_number);
Karsten Hopp 3ca42e
! 		vim_strncpy(match_ref, IObuff, 30);
Karsten Hopp 3ca42e
  		edit_submode_extra = match_ref;
Karsten Hopp 3ca42e
  		edit_submode_highl = HLF_R;
Karsten Hopp 3ca42e
  		if (dollar_vcol)
Karsten Hopp 3ca42e
--- 4970,4987 ----
Karsten Hopp 3ca42e
  	     * just a safety check. */
Karsten Hopp 3ca42e
  	    if (compl_curr_match->cp_number != -1)
Karsten Hopp 3ca42e
  	    {
Karsten Hopp 3ca42e
! 		/* Space for 10 text chars. + 2x10-digit no.s = 31.
Karsten Hopp 3ca42e
! 		 * Translations may need more than twice that. */
Karsten Hopp 3ca42e
! 		static char_u match_ref[81];
Karsten Hopp 3ca42e
  
Karsten Hopp 3ca42e
  		if (compl_matches > 0)
Karsten Hopp 3ca42e
! 		    vim_snprintf((char *)match_ref, sizeof(match_ref),
Karsten Hopp 3ca42e
! 				_("match %d of %d"),
Karsten Hopp 3ca42e
  				compl_curr_match->cp_number, compl_matches);
Karsten Hopp 3ca42e
  		else
Karsten Hopp 3ca42e
! 		    vim_snprintf((char *)match_ref, sizeof(match_ref),
Karsten Hopp 3ca42e
! 				_("match %d"),
Karsten Hopp 3ca42e
! 				compl_curr_match->cp_number);
Karsten Hopp 3ca42e
  		edit_submode_extra = match_ref;
Karsten Hopp 3ca42e
  		edit_submode_highl = HLF_R;
Karsten Hopp 3ca42e
  		if (dollar_vcol)
Karsten Hopp 3ca42e
*** ../vim-7.0.188/src/version.c	Tue Jan 16 22:13:53 2007
Karsten Hopp 3ca42e
--- src/version.c	Sun Feb  4 02:35:43 2007
Karsten Hopp 3ca42e
***************
Karsten Hopp 3ca42e
*** 668,669 ****
Karsten Hopp 3ca42e
--- 668,671 ----
Karsten Hopp 3ca42e
  {   /* Add new patch number below this line */
Karsten Hopp 3ca42e
+ /**/
Karsten Hopp 3ca42e
+     189,
Karsten Hopp 3ca42e
  /**/
Karsten Hopp 3ca42e
Karsten Hopp 3ca42e
-- 
Karsten Hopp 3ca42e
How many light bulbs does it take to change a person?
Karsten Hopp 3ca42e
Karsten Hopp 3ca42e
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 3ca42e
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 3ca42e
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 3ca42e
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///