diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp index f8ebc6f0..345ba20a 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp @@ -223,6 +223,9 @@ void Searching::displaySectionCentered(int posStart, int posEnd, ScintillaEditVi pEditView->execute(SCI_GOTOPOS, isDownwards ? posEnd : posStart); pEditView->execute(SCI_SETYCARETPOLICY, CARET_EVEN); + // Adjust so that we see the entire match; primarily horizontally + pEditView->execute(SCI_SCROLLRANGE, posStart, posEnd); + // Move cursor to end of result and select result pEditView->execute(SCI_GOTOPOS, posEnd); pEditView->execute(SCI_SETANCHOR, posStart);