forked from aniani/vim
updated for version 7.3.258
Problem: MS-Windows: The edit with existing vim context menu entries can be unwanted. Solution: Let a registry entry disable them. (Jerome Vuarand)
This commit is contained in:
parent
e9edd7fbdd
commit
ce35c88ade
@ -586,7 +586,22 @@ STDMETHODIMP CShellExt::QueryContextMenu(HMENU hMenu,
|
|||||||
|
|
||||||
// Initialize m_cntOfHWnd to 0
|
// Initialize m_cntOfHWnd to 0
|
||||||
m_cntOfHWnd = 0;
|
m_cntOfHWnd = 0;
|
||||||
// Retrieve all the vim instances
|
|
||||||
|
HKEY keyhandle;
|
||||||
|
bool showExisting = true;
|
||||||
|
|
||||||
|
// Check whether "Edit with existing Vim" entries are disabled.
|
||||||
|
if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, "Software\\Vim\\Gvim", 0,
|
||||||
|
KEY_READ, &keyhandle) == ERROR_SUCCESS)
|
||||||
|
{
|
||||||
|
if (RegQueryValueEx(keyhandle, "DisableEditWithExisting", 0, NULL,
|
||||||
|
NULL, NULL) == ERROR_SUCCESS)
|
||||||
|
showExisting = false;
|
||||||
|
RegCloseKey(keyhandle);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Retrieve all the vim instances, unless disabled.
|
||||||
|
if (showExisting)
|
||||||
EnumWindows(EnumWindowsProc, (LPARAM)this);
|
EnumWindows(EnumWindowsProc, (LPARAM)this);
|
||||||
|
|
||||||
if (cbFiles > 1)
|
if (cbFiles > 1)
|
||||||
|
@ -709,6 +709,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
258,
|
||||||
/**/
|
/**/
|
||||||
257,
|
257,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user