From 4b8d83a8f882e6cd7c0acb570f871a519104e691 Mon Sep 17 00:00:00 2001 From: Don HO Date: Tue, 7 Jul 2020 13:00:30 +0200 Subject: [PATCH] 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 --- PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index 879300b64..9e814dde5 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -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(execute(SCI_LINEFROMPOSITION, pos));