lkundrak / rpms / vim

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