Make the text direction of finder's search result follow the main edit zone's one

This commit is contained in:
Don HO 2020-12-12 13:03:31 +01:00
parent edaa67db28
commit 5e96dd0166
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -2475,12 +2475,9 @@ Finder * FindReplaceDlg::createFinder()
{
Finder *pFinder = new Finder();
pFinder->init(_hInst, (*_ppEditView)->getHParent(), _ppEditView);
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
bool isRTL = pNativeSpeaker->isRTL();
tTbData data = { 0 };
bool isRTL = (*_ppEditView)->isTextDirectionRTL();
pFinder->create(&data, isRTL);
::SendMessage(_hParent, NPPM_MODELESSDIALOG, MODELESSDIALOGREMOVE, reinterpret_cast<WPARAM>(pFinder->getHSelf()));
// define the default docking behaviour
@ -2494,6 +2491,7 @@ Finder * FindReplaceDlg::createFinder()
// in this case is DOCKABLE_DEMO_INDEX
data.dlgID = 0;
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
generic_string text = pNativeSpeaker->getLocalizedStrFromID("find-result-caption", TEXT(""));
if (!text.empty())
{