Scroll visible area horizontally so a FindNext match is fully viewable

Fix #8804, close #8818
This commit is contained in:
Scott Sumner 2020-09-06 18:13:09 -04:00 committed by Don HO
parent d82aba7b0c
commit 93ae69e92d

View File

@ -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);