lkundrak / rpms / vim

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