lkundrak / rpms / vim

Forked from rpms/vim 4 years ago
Clone
a81c14f
To: vim-dev@vim.org
a81c14f
Subject: Patch 7.2.362 (extra)
a81c14f
Fcc: outbox
a81c14f
From: Bram Moolenaar <Bram@moolenaar.net>
a81c14f
Mime-Version: 1.0
a81c14f
Content-Type: text/plain; charset=UTF-8
a81c14f
Content-Transfer-Encoding: 8bit
a81c14f
------------
a81c14f
a81c14f
Patch 7.2.362 (extra, after 7.2.352)
a81c14f
Problem:    Win64: Vim doesn't work when cross-compiled with MingW libraries.
a81c14f
Solution:   Instead of handling WM_NCCREATE, create wide text area window
a81c14f
            class if the parent window iw side. (Sergey Khorev)
a81c14f
Files:      src/gui_w32.c, src/gui_w48.c
a81c14f
a81c14f
a81c14f
*** ../vim-7.2.361/src/gui_w32.c	2009-12-24 16:11:24.000000000 +0100
a81c14f
--- src/gui_w32.c	2010-02-17 16:26:58.000000000 +0100
a81c14f
***************
a81c14f
*** 1329,1334 ****
a81c14f
--- 1329,1335 ----
a81c14f
      WNDCLASS wndclass;
a81c14f
  #ifdef FEAT_MBYTE
a81c14f
      const WCHAR szVimWndClassW[] = VIM_CLASSW;
a81c14f
+     const WCHAR szTextAreaClassW[] = L"VimTextArea";
a81c14f
      WNDCLASSW wndclassw;
a81c14f
  #endif
a81c14f
  #ifdef GLOBAL_IME
a81c14f
***************
a81c14f
*** 1479,1484 ****
a81c14f
--- 1480,1507 ----
a81c14f
  #endif
a81c14f
  
a81c14f
      /* Create the text area window */
a81c14f
+ #ifdef FEAT_MBYTE
a81c14f
+     if (wide_WindowProc)
a81c14f
+     {
a81c14f
+ 	if (GetClassInfoW(s_hinst, szTextAreaClassW, &wndclassw) == 0)
a81c14f
+ 	{
a81c14f
+ 	    wndclassw.style = CS_OWNDC;
a81c14f
+ 	    wndclassw.lpfnWndProc = _TextAreaWndProc;
a81c14f
+ 	    wndclassw.cbClsExtra = 0;
a81c14f
+ 	    wndclassw.cbWndExtra = 0;
a81c14f
+ 	    wndclassw.hInstance = s_hinst;
a81c14f
+ 	    wndclassw.hIcon = NULL;
a81c14f
+ 	    wndclassw.hCursor = LoadCursor(NULL, IDC_ARROW);
a81c14f
+ 	    wndclassw.hbrBackground = NULL;
a81c14f
+ 	    wndclassw.lpszMenuName = NULL;
a81c14f
+ 	    wndclassw.lpszClassName = szTextAreaClassW;
a81c14f
+ 
a81c14f
+ 	    if (RegisterClassW(&wndclassw) == 0)
a81c14f
+ 		return FAIL;
a81c14f
+ 	}
a81c14f
+     }
a81c14f
+     else
a81c14f
+ #endif
a81c14f
      if (GetClassInfo(s_hinst, szTextAreaClass, &wndclass) == 0)
a81c14f
      {
a81c14f
  	wndclass.style = CS_OWNDC;
a81c14f
*** ../vim-7.2.361/src/gui_w48.c	2010-02-03 12:23:16.000000000 +0100
a81c14f
--- src/gui_w48.c	2010-02-17 16:27:21.000000000 +0100
a81c14f
***************
a81c14f
*** 1084,1096 ****
a81c14f
  	case WM_NOTIFY: Handle_WM_Notify(hwnd, (LPNMHDR)lParam);
a81c14f
  	    return TRUE;
a81c14f
  #endif
a81c14f
- 	/* Workaround for the problem that MyWindowProc() returns FALSE on 64
a81c14f
- 	 * bit windows when cross-compiled using Mingw libraries. (Andy
a81c14f
- 	 * Kittner) */
a81c14f
- 	case WM_NCCREATE:
a81c14f
- 	    MyWindowProc(hwnd, uMsg, wParam, lParam);
a81c14f
- 	    return TRUE;
a81c14f
- 
a81c14f
  	default:
a81c14f
  	    return MyWindowProc(hwnd, uMsg, wParam, lParam);
a81c14f
      }
a81c14f
--- 1084,1089 ----
a81c14f
*** ../vim-7.2.361/src/version.c	2010-02-17 16:23:03.000000000 +0100
a81c14f
--- src/version.c	2010-02-17 16:30:52.000000000 +0100
a81c14f
***************
a81c14f
*** 683,684 ****
a81c14f
--- 683,686 ----
a81c14f
  {   /* Add new patch number below this line */
a81c14f
+ /**/
a81c14f
+     362,
a81c14f
  /**/
a81c14f
a81c14f
-- 
a81c14f
"Marriage is the process of finding out what kind of man your wife
a81c14f
would have preferred"
a81c14f
a81c14f
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
a81c14f
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
a81c14f
\\\        download, build and distribute -- http://www.A-A-P.org        ///
a81c14f
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///