From aff45b1132ec2672bae61b8dcf4260f02cfedd52 Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Thu, 15 Mar 2018 09:35:33 +0100 Subject: [PATCH] + fix: X-Caret policy --- src/Notepad3.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Notepad3.c b/src/Notepad3.c index e76af790f..4faed29f9 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -209,7 +209,7 @@ int iSciFontQuality; int iHighDpiToolBar; int iUpdateDelayHyperlinkStyling; int iUpdateDelayMarkAllCoccurrences; -int iCurrentLineHorizontalSlop = 0; +int iCurrentLineHorizontalSlop = 1; int iCurrentLineVerticalSlop = 0; const int DirectWriteTechnology[4] = { @@ -1258,10 +1258,11 @@ void __fastcall InitializeSciEditCtrl(HWND hwndEditCtrl) // Properties SendMessage(hwndEditCtrl, SCI_SETCARETSTICKY, SC_CARETSTICKY_OFF, 0); //SendMessage(hwndEditCtrl,SCI_SETCARETSTICKY,SC_CARETSTICKY_WHITESPACE,0); + if (iCurrentLineHorizontalSlop > 0) SendMessage(hwndEditCtrl, SCI_SETXCARETPOLICY, (WPARAM)(CARET_SLOP | CARET_EVEN | CARET_STRICT), iCurrentLineHorizontalSlop); else - SendMessage(hwndEditCtrl, SCI_SETXCARETPOLICY, (WPARAM)(CARET_EVEN), 0); + SendMessage(hwndEditCtrl, SCI_SETXCARETPOLICY, (WPARAM)(CARET_SLOP | CARET_EVEN | CARET_STRICT), (LPARAM)0); if (iCurrentLineVerticalSlop > 0) SendMessage(hwndEditCtrl, SCI_SETYCARETPOLICY, (WPARAM)(CARET_SLOP | CARET_EVEN | CARET_STRICT), iCurrentLineVerticalSlop); @@ -6078,7 +6079,7 @@ void LoadSettings() iCurrentLineHorizontalSlop = max(min(iCurrentLineHorizontalSlop, 2000), 0); iCurrentLineVerticalSlop = IniSectionGetInt(pIniSection, L"CurrentLineVerticalSlop", 0); - iCurrentLineVerticalSlop = max(min(iCurrentLineVerticalSlop, 80), 0); + iCurrentLineVerticalSlop = max(min(iCurrentLineVerticalSlop, 200), 0); LoadIniSection(L"Toolbar Images",pIniSection,cchIniSection);