Karsten Hopp 578049
To: vim_dev@googlegroups.com
Karsten Hopp 578049
Subject: Patch 7.3.1245
Karsten Hopp 578049
Fcc: outbox
Karsten Hopp 578049
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp 578049
Mime-Version: 1.0
Karsten Hopp 578049
Content-Type: text/plain; charset=UTF-8
Karsten Hopp 578049
Content-Transfer-Encoding: 8bit
Karsten Hopp 578049
------------
Karsten Hopp 578049
Karsten Hopp 578049
Patch 7.3.1245
Karsten Hopp 578049
Problem:    MS-Windows: confirm() dialog text may still not fit.
Karsten Hopp 578049
Solution:   Use GetTextWidthEnc() instead of GetTextWidth() in two more
Karsten Hopp 578049
            places. (Yasuhiro Matsumoto)
Karsten Hopp 578049
Files:      src/gui_w32.c
Karsten Hopp 578049
Karsten Hopp 578049
Karsten Hopp 578049
*** ../vim-7.3.1244/src/gui_w32.c	2013-06-26 12:58:28.000000000 +0200
Karsten Hopp 578049
--- src/gui_w32.c	2013-06-26 13:13:43.000000000 +0200
Karsten Hopp 578049
***************
Karsten Hopp 578049
*** 3282,3288 ****
Karsten Hopp 578049
  	    pend = vim_strchr(pstart, DLG_BUTTON_SEP);
Karsten Hopp 578049
  	    if (pend == NULL)
Karsten Hopp 578049
  		pend = pstart + STRLEN(pstart);	// Last button name.
Karsten Hopp 578049
! 	    textWidth = GetTextWidth(hdc, pstart, (int)(pend - pstart));
Karsten Hopp 578049
  	    if (textWidth < minButtonWidth)
Karsten Hopp 578049
  		textWidth = minButtonWidth;
Karsten Hopp 578049
  	    textWidth += dlgPaddingX;	    /* Padding within button */
Karsten Hopp 578049
--- 3282,3288 ----
Karsten Hopp 578049
  	    pend = vim_strchr(pstart, DLG_BUTTON_SEP);
Karsten Hopp 578049
  	    if (pend == NULL)
Karsten Hopp 578049
  		pend = pstart + STRLEN(pstart);	// Last button name.
Karsten Hopp 578049
! 	    textWidth = GetTextWidthEnc(hdc, pstart, (int)(pend - pstart));
Karsten Hopp 578049
  	    if (textWidth < minButtonWidth)
Karsten Hopp 578049
  		textWidth = minButtonWidth;
Karsten Hopp 578049
  	    textWidth += dlgPaddingX;	    /* Padding within button */
Karsten Hopp 578049
***************
Karsten Hopp 578049
*** 3307,3313 ****
Karsten Hopp 578049
  	    pend = vim_strchr(pstart, DLG_BUTTON_SEP);
Karsten Hopp 578049
  	    if (pend == NULL)
Karsten Hopp 578049
  		pend = pstart + STRLEN(pstart);	// Last button name.
Karsten Hopp 578049
! 	    textWidth = GetTextWidth(hdc, pstart, (int)(pend - pstart));
Karsten Hopp 578049
  	    textWidth += dlgPaddingX;		/* Padding within button */
Karsten Hopp 578049
  	    textWidth += DLG_VERT_PADDING_X * 2; /* Padding around button */
Karsten Hopp 578049
  	    if (textWidth > dlgwidth)
Karsten Hopp 578049
--- 3307,3313 ----
Karsten Hopp 578049
  	    pend = vim_strchr(pstart, DLG_BUTTON_SEP);
Karsten Hopp 578049
  	    if (pend == NULL)
Karsten Hopp 578049
  		pend = pstart + STRLEN(pstart);	// Last button name.
Karsten Hopp 578049
! 	    textWidth = GetTextWidthEnc(hdc, pstart, (int)(pend - pstart));
Karsten Hopp 578049
  	    textWidth += dlgPaddingX;		/* Padding within button */
Karsten Hopp 578049
  	    textWidth += DLG_VERT_PADDING_X * 2; /* Padding around button */
Karsten Hopp 578049
  	    if (textWidth > dlgwidth)
Karsten Hopp 578049
*** ../vim-7.3.1244/src/version.c	2013-06-26 12:58:28.000000000 +0200
Karsten Hopp 578049
--- src/version.c	2013-06-26 13:14:19.000000000 +0200
Karsten Hopp 578049
***************
Karsten Hopp 578049
*** 730,731 ****
Karsten Hopp 578049
--- 730,733 ----
Karsten Hopp 578049
  {   /* Add new patch number below this line */
Karsten Hopp 578049
+ /**/
Karsten Hopp 578049
+     1245,
Karsten Hopp 578049
  /**/
Karsten Hopp 578049
Karsten Hopp 578049
-- 
Karsten Hopp 578049
TALL KNIGHT OF NI: Ni!
Karsten Hopp 578049
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
Karsten Hopp 578049
Karsten Hopp 578049
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp 578049
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp 578049
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp 578049
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///