0e113c4
To: vim-dev@vim.org
0e113c4
Subject: Patch 7.2.091
0e113c4
Fcc: outbox
0e113c4
From: Bram Moolenaar <Bram@moolenaar.net>
0e113c4
Mime-Version: 1.0
0e113c4
Content-Type: text/plain; charset=ISO-8859-1
0e113c4
Content-Transfer-Encoding: 8bit
0e113c4
------------
0e113c4
0e113c4
Patch 7.2.091
0e113c4
Problem:    ":cs help" output is not aligned for some languages.
0e113c4
Solution:   Compute character size instead of byte size. (Dominique Pelle)
0e113c4
Files:	    src/if_cscope.c
0e113c4
0e113c4
0e113c4
*** ../vim-7.2.090/src/if_cscope.c	Mon Aug 25 04:35:13 2008
0e113c4
--- src/if_cscope.c	Thu Jan 22 18:44:46 2009
0e113c4
***************
0e113c4
*** 1177,1184 ****
0e113c4
      (void)MSG_PUTS(_("cscope commands:\n"));
0e113c4
      while (cmdp->name != NULL)
0e113c4
      {
0e113c4
! 	(void)smsg((char_u *)_("%-5s: %-30s (Usage: %s)"),
0e113c4
! 				      cmdp->name, _(cmdp->help), cmdp->usage);
0e113c4
  	if (strcmp(cmdp->name, "find") == 0)
0e113c4
  	    MSG_PUTS(_("\n"
0e113c4
  		       "       c: Find functions calling this function\n"
0e113c4
--- 1177,1192 ----
0e113c4
      (void)MSG_PUTS(_("cscope commands:\n"));
0e113c4
      while (cmdp->name != NULL)
0e113c4
      {
0e113c4
! 	char *help = _(cmdp->help);
0e113c4
! 	int  space_cnt = 30 - vim_strsize((char_u *)help);
0e113c4
! 
0e113c4
! 	/* Use %*s rather than %30s to ensure proper alignment in utf-8 */
0e113c4
! 	if (space_cnt < 0)
0e113c4
! 	    space_cnt = 0;
0e113c4
! 	(void)smsg((char_u *)_("%-5s: %s%*s (Usage: %s)"),
0e113c4
! 				      cmdp->name,
0e113c4
! 				      help, space_cnt, " ",
0e113c4
! 				      cmdp->usage);
0e113c4
  	if (strcmp(cmdp->name, "find") == 0)
0e113c4
  	    MSG_PUTS(_("\n"
0e113c4
  		       "       c: Find functions calling this function\n"
0e113c4
*** ../vim-7.2.090/src/version.c	Wed Jan 28 15:42:07 2009
0e113c4
--- src/version.c	Wed Jan 28 16:02:25 2009
0e113c4
***************
0e113c4
*** 678,679 ****
0e113c4
--- 678,681 ----
0e113c4
  {   /* Add new patch number below this line */
0e113c4
+ /**/
0e113c4
+     91,
0e113c4
  /**/
0e113c4
0e113c4
-- 
0e113c4
How To Keep A Healthy Level Of Insanity:
0e113c4
18. When leaving the zoo, start running towards the parking lot,
0e113c4
    yelling "run for your lives, they're loose!!"
0e113c4
0e113c4
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
0e113c4
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
0e113c4
\\\        download, build and distribute -- http://www.A-A-P.org        ///
0e113c4
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///