Fix the regression of jump line failure via command line (-n)

This regression is due to 9387dcdaef19289af87f24639bf7336526d027f5
Fixed by using the provided solution:
https://github.com/notepad-plus-plus/notepad-plus-plus/issues/8476#issuecomment-653826008

Fix #8476, fix #8477
This commit is contained in:
Don HO 2020-07-07 13:00:30 +02:00
parent 8920dc40be
commit 4b8d83a8f8
No known key found for this signature in database
GPG Key ID: 6C429F1D8D84F46E

View File

@ -3290,6 +3290,8 @@ void ScintillaEditView::foldChanged(size_t line, int levelNow, int levelPrev)
void ScintillaEditView::scrollPosToCenter(size_t pos)
{
_positionRestoreNeeded = false;
execute(SCI_GOTOPOS, pos);
int line = static_cast<int32_t>(execute(SCI_LINEFROMPOSITION, pos));