Karsten Hopp 782b58
To: vim_dev@googlegroups.com
Karsten Hopp 782b58
Subject: Patch 7.3.081
Karsten Hopp 782b58
Fcc: outbox
Karsten Hopp 782b58
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 782b58
Mime-Version: 1.0
Karsten Hopp 782b58
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 782b58
Content-Transfer-Encoding: 8bit
Karsten Hopp 782b58
------------
Karsten Hopp 782b58
Karsten Hopp 782b58
Patch 7.3.081
Karsten Hopp 782b58
Problem:    Non-printable characters in 'statusline' cause trouble. (ZyX)
Karsten Hopp 782b58
Solution:   Use transstr(). (partly by Caio Ariede)
Karsten Hopp 782b58
Files:	    src/screen.c
Karsten Hopp 782b58
Karsten Hopp 782b58
Karsten Hopp 782b58
*** ../vim-7.3.080/src/screen.c	2010-08-15 21:57:32.000000000 +0200
Karsten Hopp 782b58
--- src/screen.c	2010-12-08 19:27:20.000000000 +0100
Karsten Hopp 782b58
***************
Karsten Hopp 782b58
*** 3405,3413 ****
Karsten Hopp 782b58
  # endif
Karsten Hopp 782b58
  		   )
Karsten Hopp 782b58
  		{
Karsten Hopp 782b58
! 		    int_u	text_sign;
Karsten Hopp 782b58
  # ifdef FEAT_SIGN_ICONS
Karsten Hopp 782b58
! 		    int_u	icon_sign;
Karsten Hopp 782b58
  # endif
Karsten Hopp 782b58
  
Karsten Hopp 782b58
  		    /* Draw two cells with the sign value or blank. */
Karsten Hopp 782b58
--- 3405,3413 ----
Karsten Hopp 782b58
  # endif
Karsten Hopp 782b58
  		   )
Karsten Hopp 782b58
  		{
Karsten Hopp 782b58
! 		    int	text_sign;
Karsten Hopp 782b58
  # ifdef FEAT_SIGN_ICONS
Karsten Hopp 782b58
! 		    int	icon_sign;
Karsten Hopp 782b58
  # endif
Karsten Hopp 782b58
  
Karsten Hopp 782b58
  		    /* Draw two cells with the sign value or blank. */
Karsten Hopp 782b58
***************
Karsten Hopp 782b58
*** 6522,6529 ****
Karsten Hopp 782b58
  				stl, use_sandbox,
Karsten Hopp 782b58
  				fillchar, maxwidth, hltab, tabtab);
Karsten Hopp 782b58
      vim_free(stl);
Karsten Hopp 782b58
-     len = (int)STRLEN(buf);
Karsten Hopp 782b58
  
Karsten Hopp 782b58
      while (width < maxwidth && len < (int)sizeof(buf) - 1)
Karsten Hopp 782b58
      {
Karsten Hopp 782b58
  #ifdef FEAT_MBYTE
Karsten Hopp 782b58
--- 6522,6538 ----
Karsten Hopp 782b58
  				stl, use_sandbox,
Karsten Hopp 782b58
  				fillchar, maxwidth, hltab, tabtab);
Karsten Hopp 782b58
      vim_free(stl);
Karsten Hopp 782b58
  
Karsten Hopp 782b58
+     /* Make all characters printable. */
Karsten Hopp 782b58
+     p = transstr(buf);
Karsten Hopp 782b58
+     if (p != NULL)
Karsten Hopp 782b58
+     {
Karsten Hopp 782b58
+ 	vim_strncpy(buf, p, sizeof(buf) - 1);
Karsten Hopp 782b58
+ 	vim_free(p);
Karsten Hopp 782b58
+     }
Karsten Hopp 782b58
+ 
Karsten Hopp 782b58
+     /* fill up with "fillchar" */
Karsten Hopp 782b58
+     len = (int)STRLEN(buf);
Karsten Hopp 782b58
      while (width < maxwidth && len < (int)sizeof(buf) - 1)
Karsten Hopp 782b58
      {
Karsten Hopp 782b58
  #ifdef FEAT_MBYTE
Karsten Hopp 782b58
*** ../vim-7.3.080/src/version.c	2010-12-08 17:09:27.000000000 +0100
Karsten Hopp 782b58
--- src/version.c	2010-12-08 19:31:40.000000000 +0100
Karsten Hopp 782b58
***************
Karsten Hopp 782b58
*** 716,717 ****
Karsten Hopp 782b58
--- 716,719 ----
Karsten Hopp 782b58
  {   /* Add new patch number below this line */
Karsten Hopp 782b58
+ /**/
Karsten Hopp 782b58
+     81,
Karsten Hopp 782b58
  /**/
Karsten Hopp 782b58
Karsten Hopp 782b58
-- 
Karsten Hopp 782b58
hundred-and-one symptoms of being an internet addict:
Karsten Hopp 782b58
6. You refuse to go to a vacation spot with no electricity and no phone lines.
Karsten Hopp 782b58
Karsten Hopp 782b58
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 782b58
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 782b58
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 782b58
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///