[BUG_FIXED] Fix crash bug while loading File of User Defined Language.
Fusion 2 commands "activate main view" and "activate sub view" in "Focus the other view". git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@365 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
e6d799a644
commit
abf2bffba8
|
@ -3991,13 +3991,22 @@ void Notepad_plus::command(int id)
|
|||
docOpenInNewInstance(TransferClone);
|
||||
break;
|
||||
|
||||
case IDM_VIEW_SWITCHTO_MAIN:
|
||||
switchEditViewTo(MAIN_VIEW);
|
||||
break;
|
||||
|
||||
case IDM_VIEW_SWITCHTO_SUB:
|
||||
switchEditViewTo(SUB_VIEW);
|
||||
case IDM_VIEW_SWITCHTO_OTHER_VIEW:
|
||||
{
|
||||
int view_to_focus;
|
||||
HWND wnd = GetFocus();
|
||||
if (_pEditView->getHSelf() == wnd)
|
||||
{
|
||||
view_to_focus = otherView();
|
||||
if (!viewVisible(view_to_focus)) view_to_focus = _activeView;
|
||||
}
|
||||
else
|
||||
{
|
||||
view_to_focus = currentView();
|
||||
}
|
||||
switchEditViewTo(view_to_focus);
|
||||
break;
|
||||
}
|
||||
|
||||
case IDM_ABOUT:
|
||||
{
|
||||
|
|
|
@ -317,8 +317,7 @@ BEGIN
|
|||
MENUITEM SEPARATOR
|
||||
MENUITEM "Go to another view", IDM_VIEW_GOTO_ANOTHER_VIEW
|
||||
MENUITEM "Clone to another view", IDM_VIEW_CLONE_TO_ANOTHER_VIEW
|
||||
MENUITEM "Activate main view", IDM_VIEW_SWITCHTO_MAIN
|
||||
MENUITEM "Activate sub view", IDM_VIEW_SWITCHTO_SUB
|
||||
MENUITEM "Focus on other view", IDM_VIEW_SWITCHTO_OTHER_VIEW // working, but no need in menu
|
||||
MENUITEM "Go to new instance", IDM_VIEW_GOTO_NEW_INSTANCE
|
||||
MENUITEM "Open to new instance", IDM_VIEW_LOAD_IN_NEW_INSTANCE
|
||||
MENUITEM SEPARATOR
|
||||
|
|
|
@ -154,8 +154,7 @@ WinMenuKeyDefinition winKeyDefs[] = { //array of accelerator keys for all std me
|
|||
{VK_NULL, IDM_VIEW_CLONE_TO_ANOTHER_VIEW, false, false, false, NULL},
|
||||
{VK_NULL, IDM_VIEW_SYNSCROLLV, false, false, false, NULL},
|
||||
{VK_NULL, IDM_VIEW_SYNSCROLLH, false, false, false, NULL},
|
||||
{VK_F7, IDM_VIEW_SWITCHTO_MAIN, false, false, false, NULL},
|
||||
{VK_F8, IDM_VIEW_SWITCHTO_SUB, false, false, false, NULL},
|
||||
{VK_F8, IDM_VIEW_SWITCHTO_OTHER_VIEW, false, false, false, TEXT("Focus on other view")},
|
||||
|
||||
{VK_NULL, IDM_FORMAT_TODOS, false, false, false, NULL},
|
||||
{VK_NULL, IDM_FORMAT_TOUNIX, false, false, false, NULL},
|
||||
|
|
|
@ -1322,7 +1322,9 @@ BOOL CALLBACK UserDefineDialog::run_dlgProc(UINT message, WPARAM wParam, LPARAM
|
|||
{
|
||||
if (HIWORD(wParam) == EN_CHANGE)
|
||||
{
|
||||
::SendDlgItemMessage(_hSelf, IDC_EXT_EDIT, WM_GETTEXT, extsLenMax, (LPARAM)(_pUserLang->_ext.c_str()));
|
||||
TCHAR ext[extsLenMax];
|
||||
::SendDlgItemMessage(_hSelf, IDC_EXT_EDIT, WM_GETTEXT, extsLenMax, (LPARAM)ext);
|
||||
_pUserLang->_ext = ext;
|
||||
return TRUE;
|
||||
}
|
||||
else if (HIWORD(wParam) == CBN_SELCHANGE)
|
||||
|
|
|
@ -183,8 +183,7 @@
|
|||
#define IDM_VIEW_GOTO_NEW_INSTANCE 10003
|
||||
#define IDM_VIEW_LOAD_IN_NEW_INSTANCE 10004
|
||||
|
||||
#define IDM_VIEW_SWITCHTO_MAIN (IDM_VIEW + 70)
|
||||
#define IDM_VIEW_SWITCHTO_SUB (IDM_VIEW + 71)
|
||||
#define IDM_VIEW_SWITCHTO_OTHER_VIEW (IDM_VIEW + 72)
|
||||
|
||||
|
||||
#define IDM_FORMAT (IDM + 5000)
|
||||
|
|
Loading…
Reference in New Issue