diff --git a/PowerEditor/src/NppIO.cpp b/PowerEditor/src/NppIO.cpp index 8c66d822b..12c94a0d3 100644 --- a/PowerEditor/src/NppIO.cpp +++ b/PowerEditor/src/NppIO.cpp @@ -1249,6 +1249,7 @@ bool Notepad_plus::fileCloseAllButCurrent() { BufferID current = _pEditView->getCurrentBufferID(); const int activeViewID = currentView(); + int active = _pDocTab->getCurrentTabIndex(); bool noSaveToAll = false; bool saveToAll = false; std::vector mainSaveOpIndex, subSaveOpIndex; @@ -1422,7 +1423,6 @@ bool Notepad_plus::fileCloseAllButCurrent() } const int viewNo = currentView(); - int active = _pDocTab->getCurrentTabIndex(); size_t nbItems = _pDocTab->nbItem(); activateBuffer(_pDocTab->getBufferByIndex(0), viewNo);