From 5e96dd01664d8e7bf00bf2748862ffa68a575b4a Mon Sep 17 00:00:00 2001 From: Don HO Date: Sat, 12 Dec 2020 13:03:31 +0100 Subject: [PATCH] Make the text direction of finder's search result follow the main edit zone's one --- PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index 194abe70..13c73862 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -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(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()) {