diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 66bfaa2d3..2e254a113 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -3169,7 +3169,9 @@ bool Notepad_plus::removeBufferFromView(BufferID id, int whichOne) toActivate = active; //activate the 'active' index. Since we remove the tab first, the indices shift (on the right side) } tabToClose->deletItemAt((size_t)index); //delete first + _isFolding = true; // So we can ignore events while folding is taking place activateBuffer(tabToClose->getBufferByIndex(toActivate), whichOne); //then activate. The prevent jumpy tab behaviour + _isFolding = false; } } else diff --git a/PowerEditor/src/NppNotification.cpp b/PowerEditor/src/NppNotification.cpp index 42fa84130..204038b60 100644 --- a/PowerEditor/src/NppNotification.cpp +++ b/PowerEditor/src/NppNotification.cpp @@ -263,8 +263,11 @@ BOOL Notepad_plus::notify(SCNotification *notification) switchEditViewTo(iView); BufferID bufid = _pDocTab->getBufferByIndex(_pDocTab->getCurrentTabIndex()); if (bufid != BUFFER_INVALID) + { + _isFolding = true; // So we can ignore events while folding is taking place activateBuffer(bufid, iView); - + _isFolding = false; + } break; }