From 861f863ef70f34cfe852c07bfe6865e4834f69ca Mon Sep 17 00:00:00 2001 From: Roshni-P <58657076+Roshni-P@users.noreply.github.com> Date: Wed, 16 Sep 2020 07:11:01 +0530 Subject: [PATCH] Fix closing file in 2nd view not removed from Doc Switcher Fix #8800, close #8862 --- PowerEditor/src/NppIO.cpp | 2 ++ 1 file changed, 2 insertions(+) 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