mirror of
https://github.com/vim/vim.git
synced 2025-07-04 23:07:33 -04:00
updated for version 7.2-150
This commit is contained in:
parent
798b30bdfd
commit
99133038dc
@ -20,6 +20,7 @@ static char THIS_FILE[] = __FILE__;
|
|||||||
|
|
||||||
static BOOL g_bEnableVim = TRUE; // Vim enabled
|
static BOOL g_bEnableVim = TRUE; // Vim enabled
|
||||||
static BOOL g_bDevStudioEditor = FALSE; // Open file in Dev Studio editor simultaneously
|
static BOOL g_bDevStudioEditor = FALSE; // Open file in Dev Studio editor simultaneously
|
||||||
|
static BOOL g_bNewTabs = FALSE;
|
||||||
static int g_ChangeDir = CD_NONE; // CD after file open?
|
static int g_ChangeDir = CD_NONE; // CD after file open?
|
||||||
|
|
||||||
static void VimSetEnableState(BOOL bEnableState);
|
static void VimSetEnableState(BOOL bEnableState);
|
||||||
@ -93,8 +94,10 @@ void CCommands::SetApplicationObject (IApplication * pApplication)
|
|||||||
{
|
{
|
||||||
g_bEnableVim = GetRegistryInt(hSectionKey, "EnableVim",
|
g_bEnableVim = GetRegistryInt(hSectionKey, "EnableVim",
|
||||||
g_bEnableVim);
|
g_bEnableVim);
|
||||||
g_bDevStudioEditor = GetRegistryInt(hSectionKey,"DevStudioEditor",
|
g_bDevStudioEditor = GetRegistryInt(hSectionKey,
|
||||||
g_bDevStudioEditor);
|
"DevStudioEditor", g_bDevStudioEditor);
|
||||||
|
g_bNewTabs = GetRegistryInt(hSectionKey, "NewTabs",
|
||||||
|
g_bNewTabs);
|
||||||
g_ChangeDir = GetRegistryInt(hSectionKey, "ChangeDir",
|
g_ChangeDir = GetRegistryInt(hSectionKey, "ChangeDir",
|
||||||
g_ChangeDir);
|
g_ChangeDir);
|
||||||
RegCloseKey(hSectionKey);
|
RegCloseKey(hSectionKey);
|
||||||
@ -314,6 +317,7 @@ class CMainDialog : public CDialog
|
|||||||
enum { IDD = IDD_ADDINMAIN };
|
enum { IDD = IDD_ADDINMAIN };
|
||||||
int m_ChangeDir;
|
int m_ChangeDir;
|
||||||
BOOL m_bDevStudioEditor;
|
BOOL m_bDevStudioEditor;
|
||||||
|
BOOL m_bNewTabs;
|
||||||
//}}AFX_DATA
|
//}}AFX_DATA
|
||||||
|
|
||||||
//{{AFX_VIRTUAL(CMainDialog)
|
//{{AFX_VIRTUAL(CMainDialog)
|
||||||
@ -335,6 +339,7 @@ CMainDialog::CMainDialog (CWnd * pParent /* =NULL */ )
|
|||||||
//{{AFX_DATA_INIT(CMainDialog)
|
//{{AFX_DATA_INIT(CMainDialog)
|
||||||
m_ChangeDir = -1;
|
m_ChangeDir = -1;
|
||||||
m_bDevStudioEditor = FALSE;
|
m_bDevStudioEditor = FALSE;
|
||||||
|
m_bNewTabs = FALSE;
|
||||||
//}}AFX_DATA_INIT
|
//}}AFX_DATA_INIT
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -344,6 +349,7 @@ void CMainDialog::DoDataExchange (CDataExchange * pDX)
|
|||||||
//{{AFX_DATA_MAP(CMainDialog)
|
//{{AFX_DATA_MAP(CMainDialog)
|
||||||
DDX_Radio(pDX, IDC_CD_SOURCE_PATH, m_ChangeDir);
|
DDX_Radio(pDX, IDC_CD_SOURCE_PATH, m_ChangeDir);
|
||||||
DDX_Check(pDX, IDC_DEVSTUDIO_EDITOR, m_bDevStudioEditor);
|
DDX_Check(pDX, IDC_DEVSTUDIO_EDITOR, m_bDevStudioEditor);
|
||||||
|
DDX_Check(pDX, IDC_NEW_TABS, m_bNewTabs);
|
||||||
//}}AFX_DATA_MAP
|
//}}AFX_DATA_MAP
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -370,10 +376,12 @@ STDMETHODIMP CCommands::VisVimDialog ()
|
|||||||
CMainDialog Dlg;
|
CMainDialog Dlg;
|
||||||
|
|
||||||
Dlg.m_bDevStudioEditor = g_bDevStudioEditor;
|
Dlg.m_bDevStudioEditor = g_bDevStudioEditor;
|
||||||
|
Dlg.m_bNewTabs = g_bNewTabs;
|
||||||
Dlg.m_ChangeDir = g_ChangeDir;
|
Dlg.m_ChangeDir = g_ChangeDir;
|
||||||
if (Dlg.DoModal() == IDOK)
|
if (Dlg.DoModal() == IDOK)
|
||||||
{
|
{
|
||||||
g_bDevStudioEditor = Dlg.m_bDevStudioEditor;
|
g_bDevStudioEditor = Dlg.m_bDevStudioEditor;
|
||||||
|
g_bNewTabs = Dlg.m_bNewTabs;
|
||||||
g_ChangeDir = Dlg.m_ChangeDir;
|
g_ChangeDir = Dlg.m_ChangeDir;
|
||||||
|
|
||||||
// Save settings to registry HKEY_CURRENT_USER\Software\Vim\VisVim
|
// Save settings to registry HKEY_CURRENT_USER\Software\Vim\VisVim
|
||||||
@ -385,6 +393,8 @@ STDMETHODIMP CCommands::VisVimDialog ()
|
|||||||
{
|
{
|
||||||
WriteRegistryInt(hSectionKey, "DevStudioEditor",
|
WriteRegistryInt(hSectionKey, "DevStudioEditor",
|
||||||
g_bDevStudioEditor);
|
g_bDevStudioEditor);
|
||||||
|
WriteRegistryInt(hSectionKey, "NewTabs",
|
||||||
|
g_bNewTabs);
|
||||||
WriteRegistryInt(hSectionKey, "ChangeDir", g_ChangeDir);
|
WriteRegistryInt(hSectionKey, "ChangeDir", g_ChangeDir);
|
||||||
RegCloseKey(hSectionKey);
|
RegCloseKey(hSectionKey);
|
||||||
}
|
}
|
||||||
@ -536,9 +546,17 @@ static BOOL VimOpenFile (BSTR& FileName, long LineNr)
|
|||||||
|
|
||||||
// Make Vim open the file.
|
// Make Vim open the file.
|
||||||
// In the filename convert all \ to /, put a \ before a space.
|
// In the filename convert all \ to /, put a \ before a space.
|
||||||
|
if (g_bNewTabs)
|
||||||
|
{
|
||||||
|
sprintf(VimCmd, ":tab drop ");
|
||||||
|
s = VimCmd + 11;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
sprintf(VimCmd, ":drop ");
|
sprintf(VimCmd, ":drop ");
|
||||||
sprintf(FileNameTmp, "%S", (char *)FileName);
|
|
||||||
s = VimCmd + 6;
|
s = VimCmd + 6;
|
||||||
|
}
|
||||||
|
sprintf(FileNameTmp, "%S", (char *)FileName);
|
||||||
for (p = FileNameTmp; *p != '\0' && s < FileNameTmp + MAX_OLE_STR - 4;
|
for (p = FileNameTmp; *p != '\0' && s < FileNameTmp + MAX_OLE_STR - 4;
|
||||||
++p)
|
++p)
|
||||||
if (*p == '\\')
|
if (*p == '\\')
|
||||||
@ -691,4 +709,3 @@ static void DebugMsg (char* Msg, char* Arg)
|
|||||||
AfxMessageBox(Buf);
|
AfxMessageBox(Buf);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -16,6 +16,7 @@
|
|||||||
#define IDC_CD_SOURCE_PATH 1001
|
#define IDC_CD_SOURCE_PATH 1001
|
||||||
#define IDC_CD_SOURCE_PARENT 1002
|
#define IDC_CD_SOURCE_PARENT 1002
|
||||||
#define IDC_CD_NONE 1003
|
#define IDC_CD_NONE 1003
|
||||||
|
#define IDC_NEW_TABS 1004
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
//
|
//
|
||||||
|
@ -122,6 +122,9 @@ BEGIN
|
|||||||
CONTROL "&Open file in DevStudio editor simultaneously",
|
CONTROL "&Open file in DevStudio editor simultaneously",
|
||||||
IDC_DEVSTUDIO_EDITOR,"Button",BS_AUTOCHECKBOX | WS_GROUP |
|
IDC_DEVSTUDIO_EDITOR,"Button",BS_AUTOCHECKBOX | WS_GROUP |
|
||||||
WS_TABSTOP,7,7,153,10
|
WS_TABSTOP,7,7,153,10
|
||||||
|
CONTROL "Open files in new tabs",
|
||||||
|
IDC_NEW_TABS,"Button",BS_AUTOCHECKBOX | WS_GROUP |
|
||||||
|
WS_TABSTOP,7,21,153,10
|
||||||
GROUPBOX "Current directory",IDC_STATIC,7,35,164,58,WS_GROUP
|
GROUPBOX "Current directory",IDC_STATIC,7,35,164,58,WS_GROUP
|
||||||
CONTROL "Set to &source file path",IDC_CD_SOURCE_PATH,"Button",
|
CONTROL "Set to &source file path",IDC_CD_SOURCE_PATH,"Button",
|
||||||
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,17,49,85,10
|
BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,17,49,85,10
|
||||||
|
@ -676,6 +676,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 */
|
||||||
|
/**/
|
||||||
|
150,
|
||||||
/**/
|
/**/
|
||||||
149,
|
149,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user