Karsten Hopp e95cb3
To: vim_dev@googlegroups.com
Karsten Hopp e95cb3
Subject: Patch 7.3.258
Karsten Hopp e95cb3
Fcc: outbox
Karsten Hopp e95cb3
From: Bram Moolenaar <Bram@moolenaar.net>
Karsten Hopp e95cb3
Mime-Version: 1.0
Karsten Hopp e95cb3
Content-Type: text/plain; charset=UTF-8
Karsten Hopp e95cb3
Content-Transfer-Encoding: 8bit
Karsten Hopp e95cb3
------------
Karsten Hopp e95cb3
Karsten Hopp e95cb3
Patch 7.3.258
Karsten Hopp e95cb3
Problem:    MS-Windows: The edit with existing vim context menu entries can be
Karsten Hopp e95cb3
	    unwanted.
Karsten Hopp e95cb3
Solution:   Let a registry entry disable them. (Jerome Vuarand)
Karsten Hopp e95cb3
Files:	    src/GvimExt/gvimext.cpp
Karsten Hopp e95cb3
Karsten Hopp e95cb3
Karsten Hopp e95cb3
*** ../vim-7.3.257/src/GvimExt/gvimext.cpp	2010-08-15 21:57:29.000000000 +0200
Karsten Hopp e95cb3
--- src/GvimExt/gvimext.cpp	2011-07-20 16:48:09.000000000 +0200
Karsten Hopp e95cb3
***************
Karsten Hopp e95cb3
*** 586,593 ****
Karsten Hopp e95cb3
  
Karsten Hopp e95cb3
      // Initialize m_cntOfHWnd to 0
Karsten Hopp e95cb3
      m_cntOfHWnd = 0;
Karsten Hopp e95cb3
!     // Retrieve all the vim instances
Karsten Hopp e95cb3
!     EnumWindows(EnumWindowsProc, (LPARAM)this);
Karsten Hopp e95cb3
  
Karsten Hopp e95cb3
      if (cbFiles > 1)
Karsten Hopp e95cb3
      {
Karsten Hopp e95cb3
--- 586,608 ----
Karsten Hopp e95cb3
  
Karsten Hopp e95cb3
      // Initialize m_cntOfHWnd to 0
Karsten Hopp e95cb3
      m_cntOfHWnd = 0;
Karsten Hopp e95cb3
! 
Karsten Hopp e95cb3
!     HKEY keyhandle;
Karsten Hopp e95cb3
!     bool showExisting = true;
Karsten Hopp e95cb3
! 
Karsten Hopp e95cb3
!     // Check whether "Edit with existing Vim" entries are disabled.
Karsten Hopp e95cb3
!     if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0,
Karsten Hopp e95cb3
! 				       KEY_READ, &keyhandle) == ERROR_SUCCESS)
Karsten Hopp e95cb3
!     {
Karsten Hopp e95cb3
! 	if (RegQueryValueEx(keyhandle, "DisableEditWithExisting", 0, NULL,
Karsten Hopp e95cb3
! 						 NULL, NULL) == ERROR_SUCCESS)
Karsten Hopp e95cb3
! 	    showExisting = false;
Karsten Hopp e95cb3
! 	RegCloseKey(keyhandle);
Karsten Hopp e95cb3
!     }
Karsten Hopp e95cb3
! 
Karsten Hopp e95cb3
!     // Retrieve all the vim instances, unless disabled.
Karsten Hopp e95cb3
!     if (showExisting)
Karsten Hopp e95cb3
! 	EnumWindows(EnumWindowsProc, (LPARAM)this);
Karsten Hopp e95cb3
  
Karsten Hopp e95cb3
      if (cbFiles > 1)
Karsten Hopp e95cb3
      {
Karsten Hopp e95cb3
*** ../vim-7.3.257/src/version.c	2011-07-20 16:36:35.000000000 +0200
Karsten Hopp e95cb3
--- src/version.c	2011-07-20 16:54:34.000000000 +0200
Karsten Hopp e95cb3
***************
Karsten Hopp e95cb3
*** 711,712 ****
Karsten Hopp e95cb3
--- 711,714 ----
Karsten Hopp e95cb3
  {   /* Add new patch number below this line */
Karsten Hopp e95cb3
+ /**/
Karsten Hopp e95cb3
+     258,
Karsten Hopp e95cb3
  /**/
Karsten Hopp e95cb3
Karsten Hopp e95cb3
-- 
Karsten Hopp e95cb3
What the word 'politics' means: 'Poli' in Latin meaning 'many' and 'tics'
Karsten Hopp e95cb3
meaning 'bloodsucking creatures'.
Karsten Hopp e95cb3
Karsten Hopp e95cb3
 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
Karsten Hopp e95cb3
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
Karsten Hopp e95cb3
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
Karsten Hopp e95cb3
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///