From 93ae69e92d8193a390f925801173fcc64d6de26e Mon Sep 17 00:00:00 2001 From: Scott Sumner <30118311+sasumner@users.noreply.github.com> Date: Sun, 6 Sep 2020 18:13:09 -0400 Subject: [PATCH] Scroll visible area horizontally so a FindNext match is fully viewable Fix #8804, close #8818 --- PowerEditor/src/ScitillaComponent/FindReplaceDlg.cpp | 3 +++ 1 file changed, 3 insertions(+) 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);