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