From beeca28ccd5caedb9f8eec7108d5803928799064 Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Thu, 7 Mar 2024 11:19:52 +0100 Subject: [PATCH 1/2] +chg: line number margin option: switched from sub-line selection to whole-line selection --- src/Notepad3.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Notepad3.c b/src/Notepad3.c index 30d4958f7..6dd8481f5 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -2644,7 +2644,8 @@ static void _InitializeSciEditCtrl(HWND hwndEditCtrl) SciCall_SetEdgeColumn(Settings.LongLinesLimit); // general margin - SciCall_SetMarginOptions(SC_MARGINOPTION_SUBLINESELECT); + SciCall_SetMarginOptions(SC_MARGINOPTION_NONE); // whole line select + //SciCall_SetMarginOptions(SC_MARGINOPTION_SUBLINESELECT); // Nonprinting characters SciCall_SetViewWS(Settings.ViewWhiteSpace ? SCWS_VISIBLEALWAYS : SCWS_INVISIBLE); From f3e76cdcb6420e9df59f4c1f24ffa954c2685e18 Mon Sep 17 00:00:00 2001 From: "METANEOCORTEX\\Kotti" Date: Thu, 7 Mar 2024 11:46:21 +0100 Subject: [PATCH 2/2] +add: option to choose between sub-line and whole-line selection on line-number margin click --- Build/Notepad3.ini | 1 + src/Config/Config.cpp | 2 ++ src/Notepad3.c | 3 +-- src/TypeDefs.h | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Build/Notepad3.ini b/Build/Notepad3.ini index 37f35ab3d..48122b842 100644 --- a/Build/Notepad3.ini +++ b/Build/Notepad3.ini @@ -39,6 +39,7 @@ SettingsVersion=5 ;ShellAppUserModelID=Rizonesoft.Notepad3 ;ShellUseSystemMRU=1 ;StickyWindowPosition=0 +;SubWrappedLineSelectOnMarginClick=false ;LaunchInstanceWndPosOffset=28 ;LaunchInstanceFullVisible=true ;UseOldStyleBraceMatching=0 diff --git a/src/Config/Config.cpp b/src/Config/Config.cpp index c8cda51ee..f39062b4b 100644 --- a/src/Config/Config.cpp +++ b/src/Config/Config.cpp @@ -1335,6 +1335,8 @@ void LoadSettings() Settings2.NoCutLineOnEmptySelection = IniSectionGetBool(IniSecSettings2, L"NoCutLineOnEmptySelection", false); + Settings2.SubWrappedLineSelectOnMarginClick = IniSectionGetBool(IniSecSettings2, L"SubWrappedLineSelectOnMarginClick", false); + Settings2.AnalyzeReliableConfidenceLevel = (float)clampi(IniSectionGetInt(IniSecSettings2, L"AnalyzeReliableConfidenceLevel", 90), 0, 100) / 100.0f; int const iAnsiCPBonusSet = clampi(IniSectionGetInt(IniSecSettings2, L"LocaleAnsiCodePageAnalysisBonus", 33), 0, 100); diff --git a/src/Notepad3.c b/src/Notepad3.c index 6dd8481f5..b3c3b217d 100644 --- a/src/Notepad3.c +++ b/src/Notepad3.c @@ -2644,8 +2644,7 @@ static void _InitializeSciEditCtrl(HWND hwndEditCtrl) SciCall_SetEdgeColumn(Settings.LongLinesLimit); // general margin - SciCall_SetMarginOptions(SC_MARGINOPTION_NONE); // whole line select - //SciCall_SetMarginOptions(SC_MARGINOPTION_SUBLINESELECT); + SciCall_SetMarginOptions(Settings2.SubWrappedLineSelectOnMarginClick ? SC_MARGINOPTION_SUBLINESELECT : SC_MARGINOPTION_NONE); // Nonprinting characters SciCall_SetViewWS(Settings.ViewWhiteSpace ? SCWS_VISIBLEALWAYS : SCWS_INVISIBLE); diff --git a/src/TypeDefs.h b/src/TypeDefs.h index 1281d06f5..56dcf0b7c 100644 --- a/src/TypeDefs.h +++ b/src/TypeDefs.h @@ -764,6 +764,7 @@ typedef struct SETTINGS2_T { int CurrentLineVerticalSlop; bool NoCopyLineOnEmptySelection; bool NoCutLineOnEmptySelection; + bool SubWrappedLineSelectOnMarginClick; bool LexerSQLNumberSignAsComment; int ExitOnESCSkipLevel; int ZoomTooltipTimeout;