|
|
|
@ -880,7 +880,7 @@ LRESULT Notepad_plus::init(HWND hwnd)
|
|
|
|
|
activateBuffer(_mainEditView.getCurrentBufferID(), MAIN_VIEW); |
|
|
|
|
activateBuffer(_subEditView.getCurrentBufferID(), SUB_VIEW); |
|
|
|
|
|
|
|
|
|
_mainEditView.getFocus(); |
|
|
|
|
_mainEditView.grabFocus(); |
|
|
|
|
|
|
|
|
|
return TRUE; |
|
|
|
|
} |
|
|
|
@ -2566,7 +2566,20 @@ void Notepad_plus::checkClipboard()
|
|
|
|
|
if (!NppParameters::getInstance().getSVP()._lineCopyCutWithoutSelection) |
|
|
|
|
{ |
|
|
|
|
enableCommand(IDM_EDIT_CUT, hasSelection, MENU | TOOLBAR); |
|
|
|
|
enableCommand(IDM_EDIT_COPY, hasSelection, MENU | TOOLBAR); |
|
|
|
|
|
|
|
|
|
if (hasSelection) |
|
|
|
|
{ |
|
|
|
|
enableCommand(IDM_EDIT_COPY, true, MENU | TOOLBAR); |
|
|
|
|
} |
|
|
|
|
else if (_findReplaceDlg.allowCopyAction()) |
|
|
|
|
{ |
|
|
|
|
enableCommand(IDM_EDIT_COPY, false, TOOLBAR); |
|
|
|
|
enableCommand(IDM_EDIT_COPY, true, MENU); |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
enableCommand(IDM_EDIT_COPY, false, MENU | TOOLBAR); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
enableCommand(IDM_EDIT_PASTE, canPaste, MENU | TOOLBAR); |
|
|
|
|
enableCommand(IDM_EDIT_DELETE, hasSelection, MENU | TOOLBAR); |
|
|
|
@ -4752,7 +4765,7 @@ int Notepad_plus::switchEditViewTo(int gid)
|
|
|
|
|
if (currentView() == gid) |
|
|
|
|
{ |
|
|
|
|
//make sure focus is ok, then leave
|
|
|
|
|
_pEditView->getFocus(); //set the focus
|
|
|
|
|
_pEditView->grabFocus(); //set the focus
|
|
|
|
|
return gid; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -4768,7 +4781,7 @@ int Notepad_plus::switchEditViewTo(int gid)
|
|
|
|
|
std::swap(_pEditView, _pNonEditView); |
|
|
|
|
|
|
|
|
|
_pEditView->beSwitched(); |
|
|
|
|
_pEditView->getFocus(); //set the focus
|
|
|
|
|
_pEditView->grabFocus(); //set the focus
|
|
|
|
|
|
|
|
|
|
if (_pDocMap) |
|
|
|
|
{ |
|
|
|
@ -5939,7 +5952,7 @@ void Notepad_plus::fullScreenToggle()
|
|
|
|
|
int y = nppRect.top; |
|
|
|
|
::MoveWindow(_restoreButton.getHSelf(), x, y, w, h, FALSE); |
|
|
|
|
|
|
|
|
|
_pEditView->getFocus(); |
|
|
|
|
_pEditView->grabFocus(); |
|
|
|
|
} |
|
|
|
|
else //toggle fullscreen off
|
|
|
|
|
{ |
|
|
|
@ -6073,7 +6086,7 @@ void Notepad_plus::postItToggle()
|
|
|
|
|
int y = nppRect.top + 1; |
|
|
|
|
::MoveWindow(_restoreButton.getHSelf(), x, y, w, h, FALSE); |
|
|
|
|
|
|
|
|
|
_pEditView->getFocus(); |
|
|
|
|
_pEditView->grabFocus(); |
|
|
|
|
} |
|
|
|
|
else //PostIt enabled, disable it
|
|
|
|
|
{ |
|
|
|
@ -7697,7 +7710,7 @@ void Notepad_plus::launchDocMap()
|
|
|
|
|
_pDocMap->wrapMap(); |
|
|
|
|
_pDocMap->display(); |
|
|
|
|
|
|
|
|
|
_pEditView->getFocus(); |
|
|
|
|
_pEditView->grabFocus(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|