From 1c09290e64134099ab42d1a571a129b519ef700a Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Sat, 25 May 2024 18:12:19 +0200 Subject: [PATCH] +fix: scroll current line into view in case of word-wrap toggle --- src/Notepad3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Notepad3.c b/src/Notepad3.c index 036c20b4e..42b8fb2a5 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -5981,7 +5981,8 @@ LRESULT MsgCommand(HWND hwnd, UINT umsg, WPARAM wParam, LPARAM lParam) case IDM_VIEW_WORDWRAP: Globals.fvCurFile.bWordWrap = Settings.WordWrap = !Settings.WordWrap; _SetWrapIndentMode(Globals.hwndEdit); - Sci_ScrollSelectionToView(); + //~Sci_ScrollSelectionToView(); // does not work here bug ? + SciCall_SetFirstVisibleLine(max_ln(0, Sci_GetCurrentLineNumber() - Settings2.CurrentLineVerticalSlop)); UpdateToolbar(); break;