Skip to content

Commit

Permalink
+add: option to choose between sub-line and whole-line selection on l…
Browse files Browse the repository at this point in the history
…ine-number margin click
  • Loading branch information
RaiKoHoff committed Mar 7, 2024
1 parent beeca28 commit f3e76cd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions Build/Notepad3.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ SettingsVersion=5
;ShellAppUserModelID=Rizonesoft.Notepad3
;ShellUseSystemMRU=1
;StickyWindowPosition=0
;SubWrappedLineSelectOnMarginClick=false
;LaunchInstanceWndPosOffset=28
;LaunchInstanceFullVisible=true
;UseOldStyleBraceMatching=0
Expand Down
2 changes: 2 additions & 0 deletions src/Config/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions src/Notepad3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions src/TypeDefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@ typedef struct SETTINGS2_T {
int CurrentLineVerticalSlop;
bool NoCopyLineOnEmptySelection;
bool NoCutLineOnEmptySelection;
bool SubWrappedLineSelectOnMarginClick;
bool LexerSQLNumberSignAsComment;
int ExitOnESCSkipLevel;
int ZoomTooltipTimeout;
Expand Down

0 comments on commit f3e76cd

Please sign in to comment.