Fix regression of multi-line tabbar height not updated after closing

Fix regression of multi-line tabbar height not updated after "Close all to the Right" command.

Fix #15905, close #15906
This commit is contained in:
Don Ho 2024-12-04 00:18:28 +01:00
parent ec0b2b5aa2
commit 11a02f69c8
6 changed files with 7 additions and 14 deletions

View File

@ -6699,7 +6699,7 @@ void Notepad_plus::notifyBufferChanged(Buffer * buffer, int mask)
if (mask & (BufferChangeDirty|BufferChangeFilename))
{
if (mask & BufferChangeFilename)
::SendMessage(_pPublicInterface->getHSelf(), NPPM_INTERNAL_REFRESHTABAR, 0, 0);
::SendMessage(_pPublicInterface->getHSelf(), WM_SIZE, 0, 0);
checkDocState();
setTitle();

View File

@ -3894,13 +3894,6 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
}
break;
case NPPM_INTERNAL_REFRESHTABAR:
{
::InvalidateRect(_mainDocTab.getHSelf(), NULL, TRUE);
::InvalidateRect(_subDocTab.getHSelf(), NULL, TRUE);
break;
}
case NPPM_INTERNAL_LOCKTABBAR:
{
bool isDrag = TabBarPlus::doDragNDropOrNot();
@ -3960,7 +3953,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa
::SendMessage(_subDocTab.getHSelf(), WM_SETFONT, reinterpret_cast<WPARAM>(hf), MAKELPARAM(TRUE, 0));
}
::SendMessage(_pPublicInterface->getHSelf(), NPPM_INTERNAL_REFRESHTABAR, 0, 0);
::SendMessage(_pPublicInterface->getHSelf(), WM_SIZE, 0, 0);
_mainDocTab.refresh();
_subDocTab.refresh();

View File

@ -3991,7 +3991,7 @@ void Notepad_plus::command(int id)
nmhdr._hdr.idFrom = reinterpret_cast<UINT_PTR>(this);
nmhdr._tabOrigin = _pDocTab->getCurrentTabIndex();
::SendMessage(_pPublicInterface->getHSelf(), WM_NOTIFY, 0, reinterpret_cast<LPARAM>(&nmhdr));
::SendMessage(_pPublicInterface->getHSelf(), NPPM_INTERNAL_REFRESHTABAR, 0, 0);
::SendMessage(_pPublicInterface->getHSelf(), WM_SIZE, 0, 0);
}
break;

View File

@ -878,7 +878,7 @@ void Notepad_plus::doClose(BufferID id, int whichOne, bool doDeleteBackup)
if (buffID == BUFFER_INVALID && fileFullPath.length() > 0)
_lastRecentFileList.add(fileFullPath.c_str());
}
::SendMessage(_pPublicInterface->getHSelf(), NPPM_INTERNAL_REFRESHTABAR, 0, 0);
::SendMessage(_pPublicInterface->getHSelf(), WM_SIZE, 0, 0);
if (NppParameters::getInstance().getNppGUI()._tabStatus & TAB_QUITONEMPTY)
{

View File

@ -792,7 +792,7 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
if (_closeButtonZone.isHit(xPos, yPos, _currentHoverTabRect, _isVertical))
{
_whichCloseClickDown = getTabIndexAt(xPos, yPos);
::SendMessage(_hParent, NPPM_INTERNAL_REFRESHTABAR, 0, 0);
::SendMessage(_hParent, WM_SIZE, 0, 0);
return TRUE;
}
}
@ -802,7 +802,7 @@ LRESULT TabBarPlus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPara
if (_pinButtonZone.isHit(xPos, yPos, _currentHoverTabRect, _isVertical))
{
_whichPinClickDown = getTabIndexAt(xPos, yPos);
::SendMessage(_hParent, NPPM_INTERNAL_REFRESHTABAR, 0, 0);
::SendMessage(_hParent, WM_SIZE, 0, 0);
return TRUE;
}
}

View File

@ -714,7 +714,7 @@
#define NPPM_INTERNAL_DOCMODIFIEDBYREPLACEALL (NOTEPADPLUS_USER_INTERNAL + 79)
#define NPPM_INTERNAL_DRAWTABBARPINBUTTON (NOTEPADPLUS_USER_INTERNAL + 80)
#define NPPM_INTERNAL_DRAWTABBARCLOSEBUTTON (NOTEPADPLUS_USER_INTERNAL + 81)
#define NPPM_INTERNAL_REFRESHTABAR (NOTEPADPLUS_USER_INTERNAL + 82)
//#define NPPM_INTERNAL_REFRESHTABAR (NOTEPADPLUS_USER_INTERNAL + 82)
#define NPPM_INTERNAL_REDUCETABBAR (NOTEPADPLUS_USER_INTERNAL + 83)
#define NPPM_INTERNAL_LOCKTABBAR (NOTEPADPLUS_USER_INTERNAL + 84)
#define NPPM_INTERNAL_DRAWINACIVETAB (NOTEPADPLUS_USER_INTERNAL + 85)