diff --git a/PowerEditor/src/NppIO.cpp b/PowerEditor/src/NppIO.cpp index e46fdd8c8..c3e7ddf98 100644 --- a/PowerEditor/src/NppIO.cpp +++ b/PowerEditor/src/NppIO.cpp @@ -746,6 +746,8 @@ void Notepad_plus::doClose(BufferID id, int whichOne, bool doDeleteBackup) // if the current activated buffer is in this view, // then get buffer ID to remove the entry from File Switcher Pannel hiddenBufferID = reinterpret_cast(::SendMessage(_pPublicInterface->getHSelf(), NPPM_GETBUFFERIDFROMPOS, 0, whichOne)); + if (!isBufRemoved && hiddenBufferID != BUFFER_INVALID && _pFileSwitcherPanel) + _pFileSwitcherPanel->closeItem(hiddenBufferID, whichOne); } // Notify plugins that current file is closed