|
@@ -424,6 +424,7 @@ type
|
|
|
CursorPastEOL: Boolean;
|
|
|
TabWidth: Integer;
|
|
|
UseTabCharacter: Boolean;
|
|
|
+ ShowWhiteSpace: Boolean;
|
|
|
UseFolding: Boolean;
|
|
|
FindRegEx: Boolean;
|
|
|
WordWrap: Boolean;
|
|
@@ -850,6 +851,7 @@ constructor TMainForm.Create(AOwner: TComponent);
|
|
|
FOptions.CursorPastEOL := Ini.ReadBool('Options', 'EditorCursorPastEOL', False);
|
|
|
FOptions.TabWidth := Ini.ReadInteger('Options', 'TabWidth', 2);
|
|
|
FOptions.UseTabCharacter := Ini.ReadBool('Options', 'UseTabCharacter', False);
|
|
|
+ FOptions.ShowWhiteSpace := Ini.ReadBool('Options', 'ShowWhiteSpace', False);
|
|
|
FOptions.UseFolding := Ini.ReadBool('Options', 'UseFolding', True);
|
|
|
FOptions.FindRegEx := Ini.ReadBool('Options', 'FindRegEx', False);
|
|
|
FOptions.WordWrap := Ini.ReadBool('Options', 'WordWrap', False);
|
|
@@ -2456,12 +2458,14 @@ end;
|
|
|
procedure TMainForm.SyncEditorOptions;
|
|
|
const
|
|
|
SquigglyStyles: array[Boolean] of Integer = (INDIC_HIDDEN, INDIC_SQUIGGLE);
|
|
|
+ WhiteSpaceStyles: array[Boolean] of Integer = (SCWS_INVISIBLE, SCWS_VISIBLEALWAYS);
|
|
|
var
|
|
|
Memo: TIDEScintEdit;
|
|
|
begin
|
|
|
for Memo in FMemos do begin
|
|
|
Memo.UseStyleAttributes := FOptions.UseSyntaxHighlighting;
|
|
|
Memo.Call(SCI_INDICSETSTYLE, minSquiggly, SquigglyStyles[FOptions.UnderlineErrors]);
|
|
|
+ Memo.Call(SCI_SETVIEWWS, WhiteSpaceStyles[FOptions.ShowWhiteSpace], 0);
|
|
|
|
|
|
if FOptions.CursorPastEOL then
|
|
|
Memo.VirtualSpaceOptions := [svsRectangularSelection, svsUserAccessible, svsNoWrapLineStart]
|
|
@@ -4250,10 +4254,11 @@ begin
|
|
|
var LeftBlankMarginWidth := ToCurrentPPI(2); { 2 pixel margin between gutter and the main text }
|
|
|
var SquigglyWidth := ToCurrentPPI(100); { 100 = 1 pixel }
|
|
|
var CaretWidth := ToCurrentPPI(2);
|
|
|
+ var WhiteSpaceSize := CaretWidth;
|
|
|
|
|
|
for var Memo in FMemos do
|
|
|
- Memo.UpdateMarginsAndSquigglyAndCaretWidths(IconMarkersWidth, BaseChangeHistoryWidth,
|
|
|
- FolderMarkersWidth, LeftBlankMarginWidth, 0, SquigglyWidth, CaretWidth);
|
|
|
+ Memo.UpdateWidthsAndSizes(IconMarkersWidth, BaseChangeHistoryWidth, FolderMarkersWidth,
|
|
|
+ LeftBlankMarginWidth, 0, SquigglyWidth, CaretWidth, WhiteSpaceSize);
|
|
|
end;
|
|
|
|
|
|
procedure TMainForm.SplitPanelMouseMove(Sender: TObject;
|
|
@@ -4407,6 +4412,7 @@ begin
|
|
|
OptionsForm.CursorPastEOLCheck.Checked := FOptions.CursorPastEOL;
|
|
|
OptionsForm.TabWidthEdit.Text := IntToStr(FOptions.TabWidth);
|
|
|
OptionsForm.UseTabCharacterCheck.Checked := FOptions.UseTabCharacter;
|
|
|
+ OptionsForm.ShowWhiteSpaceCheck.Checked := FOptions.ShowWhiteSpace;
|
|
|
OptionsForm.UseFoldingCheck.Checked := FOptions.UseFolding;
|
|
|
OptionsForm.AutoIndentCheck.Checked := FOptions.AutoIndent;
|
|
|
OptionsForm.IndentationGuidesCheck.Checked := FOptions.IndentationGuides;
|
|
@@ -4440,6 +4446,7 @@ begin
|
|
|
FOptions.CursorPastEOL := OptionsForm.CursorPastEOLCheck.Checked;
|
|
|
FOptions.TabWidth := StrToInt(OptionsForm.TabWidthEdit.Text);
|
|
|
FOptions.UseTabCharacter := OptionsForm.UseTabCharacterCheck.Checked;
|
|
|
+ FOptions.ShowWhiteSpace := OptionsForm.ShowWhiteSpaceCheck.Checked;
|
|
|
FOptions.UseFolding := OptionsForm.UseFoldingCheck.Checked;
|
|
|
FOptions.AutoIndent := OptionsForm.AutoIndentCheck.Checked;
|
|
|
FOptions.IndentationGuides := OptionsForm.IndentationGuidesCheck.Checked;
|
|
@@ -4489,6 +4496,7 @@ begin
|
|
|
Ini.WriteBool('Options', 'EditorCursorPastEOL', FOptions.CursorPastEOL);
|
|
|
Ini.WriteInteger('Options', 'TabWidth', FOptions.TabWidth);
|
|
|
Ini.WriteBool('Options', 'UseTabCharacter', FOptions.UseTabCharacter);
|
|
|
+ Ini.WriteBool('Options', 'ShowWhiteSpace', FOptions.ShowWhiteSpace);
|
|
|
Ini.WriteBool('Options', 'UseFolding', FOptions.UseFolding);
|
|
|
Ini.WriteBool('Options', 'AutoIndent', FOptions.AutoIndent);
|
|
|
Ini.WriteBool('Options', 'IndentationGuides', FOptions.IndentationGuides);
|