Karsten Hopp 9b53d3
To: vim-dev@vim.org
Karsten Hopp 9b53d3
Subject: Patch 7.1.196 (extra)
Karsten Hopp 9b53d3
Fcc: outbox
Karsten Hopp 9b53d3
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 9b53d3
Mime-Version: 1.0
Karsten Hopp 9b53d3
Content-Type: text/plain; charset=ISO-8859-1
Karsten Hopp 9b53d3
Content-Transfer-Encoding: 8bit
Karsten Hopp 9b53d3
------------
Karsten Hopp 9b53d3
Karsten Hopp 9b53d3
Patch 7.1.196 (extra)
Karsten Hopp 9b53d3
Problem:    Win32 GUI: "\n" in a tooltip doesn't cause a line break. (Erik
Karsten Hopp 9b53d3
	    Falor)
Karsten Hopp 9b53d3
Solution:   Use the TTM_SETMAXTIPWIDTH message.
Karsten Hopp 9b53d3
Files:	    src/gui_w32.c
Karsten Hopp 9b53d3
Karsten Hopp 9b53d3
Karsten Hopp 9b53d3
*** ../vim-7.1.195/src/gui_w32.c	Thu Aug 30 12:24:21 2007
Karsten Hopp 9b53d3
--- src/gui_w32.c	Thu Jan  3 13:56:26 2008
Karsten Hopp 9b53d3
***************
Karsten Hopp 9b53d3
*** 987,992 ****
Karsten Hopp 9b53d3
--- 987,997 ----
Karsten Hopp 9b53d3
  			{
Karsten Hopp 9b53d3
  			    LPNMTTDISPINFOW	lpdi = (LPNMTTDISPINFOW)lParam;
Karsten Hopp 9b53d3
  
Karsten Hopp 9b53d3
+ 			    /* Set the maximum width, this also enables using
Karsten Hopp 9b53d3
+ 			     * \n for line break. */
Karsten Hopp 9b53d3
+ 			    SendMessage(lpdi->hdr.hwndFrom, TTM_SETMAXTIPWIDTH,
Karsten Hopp 9b53d3
+ 								      0, 500);
Karsten Hopp 9b53d3
+ 
Karsten Hopp 9b53d3
  			    tt_text = enc_to_ucs2(str, NULL);
Karsten Hopp 9b53d3
  			    lpdi->lpszText = tt_text;
Karsten Hopp 9b53d3
  			    /* can't show tooltip if failed */
Karsten Hopp 9b53d3
***************
Karsten Hopp 9b53d3
*** 996,1001 ****
Karsten Hopp 9b53d3
--- 1001,1011 ----
Karsten Hopp 9b53d3
  			{
Karsten Hopp 9b53d3
  			    LPNMTTDISPINFO	lpdi = (LPNMTTDISPINFO)lParam;
Karsten Hopp 9b53d3
  
Karsten Hopp 9b53d3
+ 			    /* Set the maximum width, this also enables using
Karsten Hopp 9b53d3
+ 			     * \n for line break. */
Karsten Hopp 9b53d3
+ 			    SendMessage(lpdi->hdr.hwndFrom, TTM_SETMAXTIPWIDTH,
Karsten Hopp 9b53d3
+ 								      0, 500);
Karsten Hopp 9b53d3
+ 
Karsten Hopp 9b53d3
  			    if (STRLEN(str) < sizeof(lpdi->szText)
Karsten Hopp 9b53d3
  				    || ((tt_text = vim_strsave(str)) == NULL))
Karsten Hopp 9b53d3
  				vim_strncpy(lpdi->szText, str,
Karsten Hopp 9b53d3
***************
Karsten Hopp 9b53d3
*** 4734,4745 ****
Karsten Hopp 9b53d3
  	    cur_beval->showState = ShS_NEUTRAL;
Karsten Hopp 9b53d3
  	    break;
Karsten Hopp 9b53d3
  	case TTN_GETDISPINFO:
Karsten Hopp 9b53d3
! 	{
Karsten Hopp 9b53d3
! 	    /* if you get there then we have new common controls */
Karsten Hopp 9b53d3
! 	    NMTTDISPINFO_NEW *info = (NMTTDISPINFO_NEW *)pnmh;
Karsten Hopp 9b53d3
! 	    info->lpszText = (LPSTR)info->lParam;
Karsten Hopp 9b53d3
! 	    info->uFlags |= TTF_DI_SETITEM;
Karsten Hopp 9b53d3
! 	}
Karsten Hopp 9b53d3
  	    break;
Karsten Hopp 9b53d3
  	}
Karsten Hopp 9b53d3
      }
Karsten Hopp 9b53d3
--- 4744,4755 ----
Karsten Hopp 9b53d3
  	    cur_beval->showState = ShS_NEUTRAL;
Karsten Hopp 9b53d3
  	    break;
Karsten Hopp 9b53d3
  	case TTN_GETDISPINFO:
Karsten Hopp 9b53d3
! 	    {
Karsten Hopp 9b53d3
! 		/* if you get there then we have new common controls */
Karsten Hopp 9b53d3
! 		NMTTDISPINFO_NEW *info = (NMTTDISPINFO_NEW *)pnmh;
Karsten Hopp 9b53d3
! 		info->lpszText = (LPSTR)info->lParam;
Karsten Hopp 9b53d3
! 		info->uFlags |= TTF_DI_SETITEM;
Karsten Hopp 9b53d3
! 	    }
Karsten Hopp 9b53d3
  	    break;
Karsten Hopp 9b53d3
  	}
Karsten Hopp 9b53d3
      }
Karsten Hopp 9b53d3
*** ../vim-7.1.195/src/version.c	Thu Jan  3 20:21:34 2008
Karsten Hopp 9b53d3
--- src/version.c	Thu Jan  3 20:43:22 2008
Karsten Hopp 9b53d3
***************
Karsten Hopp 9b53d3
*** 668,669 ****
Karsten Hopp 9b53d3
--- 668,671 ----
Karsten Hopp 9b53d3
  {   /* Add new patch number below this line */
Karsten Hopp 9b53d3
+ /**/
Karsten Hopp 9b53d3
+     196,
Karsten Hopp 9b53d3
  /**/
Karsten Hopp 9b53d3
Karsten Hopp 9b53d3
-- 
Karsten Hopp 9b53d3
Shit makes the flowers grow and that's beautiful
Karsten Hopp 9b53d3
Karsten Hopp 9b53d3
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 9b53d3
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 9b53d3
\\\        download, build and distribute -- http://www.A-A-P.org        ///
Karsten Hopp 9b53d3
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///