Fix edit zone not getting focus while clicking the active tab
Move input focus to editor when clicking on already-active tab. Fix #8446, close #15508pull/15516/head
parent
a16261caaa
commit
e17d77ceab
|
@ -371,24 +371,30 @@ BOOL Notepad_plus::notify(SCNotification *notification)
|
|||
_statusBar.setText((_pEditView->execute(SCI_GETOVERTYPE)) ? L"OVR" : L"INS", STATUSBAR_TYPING_MODE);
|
||||
}
|
||||
}
|
||||
else if (notification->nmhdr.hwndFrom == _mainDocTab.getHSelf() && _activeView == SUB_VIEW)
|
||||
else if (notification->nmhdr.hwndFrom == _mainDocTab.getHSelf())
|
||||
{
|
||||
bool isSnapshotMode = NppParameters::getInstance().getNppGUI().isSnapshotMode();
|
||||
if (isSnapshotMode)
|
||||
if (_activeView == SUB_VIEW)
|
||||
{
|
||||
// Before switching off, synchronize backup file
|
||||
MainFileManager.backupCurrentBuffer();
|
||||
bool isSnapshotMode = NppParameters::getInstance().getNppGUI().isSnapshotMode();
|
||||
if (isSnapshotMode)
|
||||
{
|
||||
// Before switching off, synchronize backup file
|
||||
MainFileManager.backupCurrentBuffer();
|
||||
}
|
||||
}
|
||||
// Switch off
|
||||
switchEditViewTo(MAIN_VIEW);
|
||||
}
|
||||
else if (notification->nmhdr.hwndFrom == _subDocTab.getHSelf() && _activeView == MAIN_VIEW)
|
||||
else if (notification->nmhdr.hwndFrom == _subDocTab.getHSelf())
|
||||
{
|
||||
bool isSnapshotMode = NppParameters::getInstance().getNppGUI().isSnapshotMode();
|
||||
if (isSnapshotMode)
|
||||
if (_activeView == MAIN_VIEW)
|
||||
{
|
||||
// Before switching off, synchronize backup file
|
||||
MainFileManager.backupCurrentBuffer();
|
||||
bool isSnapshotMode = NppParameters::getInstance().getNppGUI().isSnapshotMode();
|
||||
if (isSnapshotMode)
|
||||
{
|
||||
// Before switching off, synchronize backup file
|
||||
MainFileManager.backupCurrentBuffer();
|
||||
}
|
||||
}
|
||||
// Switch off
|
||||
switchEditViewTo(SUB_VIEW);
|
||||
|
|
Loading…
Reference in New Issue