diff --git a/src/ce_d2syn.pas b/src/ce_d2syn.pas index 4895b783..3899a6e6 100644 --- a/src/ce_d2syn.pas +++ b/src/ce_d2syn.pas @@ -274,7 +274,7 @@ begin fFoldKinds := [fkBrackets]; - WordBreakChars := WordBreakChars + ['&', '~', '`']; + WordBreakChars := WordBreakChars - ['@']; fWhiteAttrib := TSynHighlighterAttributes.Create('White','White'); fNumbrAttrib := TSynHighlighterAttributes.Create('Number','Number'); diff --git a/src/ce_editoroptions.pas b/src/ce_editoroptions.pas index a2542feb..1da73665 100644 --- a/src/ce_editoroptions.pas +++ b/src/ce_editoroptions.pas @@ -31,6 +31,7 @@ type fSelCol: TSynSelectedColor; fFoldedColor: TSynSelectedColor; fMouseLinkColor: TSynSelectedColor; + fBracketMatchColor: TSynSelectedColor; fFont: TFont; // fTabWidth: Integer; @@ -48,9 +49,11 @@ type procedure setSelCol(aValue: TSynSelectedColor); procedure setFoldedColor(aValue: TSynSelectedColor); procedure setMouseLinkColor(aValue: TSynSelectedColor); + procedure setBracketMatchColor(aValue: TSynSelectedColor); procedure setD2Syn(aValue: TPersistent); procedure setTxtSyn(aValue: TPersistent); published + property bracketMatchColor: TSynSelectedColor read fBracketMatchColor write setBracketMatchColor; property mouseLinkColor: TSynSelectedColor read fMouseLinkColor write setMouseLinkColor; property selectedColor: TSynSelectedColor read fSelCol write setSelCol; property foldedColor: TSynSelectedColor read fFoldedColor write setFoldedColor; @@ -128,6 +131,7 @@ begin fSelCol := TSynSelectedColor.Create; fFoldedColor := TSynSelectedColor.Create; fMouseLinkColor := TSynSelectedColor.Create; + fBracketMatchColor := TSynSelectedColor.Create; // // note: default values come from TSynEditFoldedView ctor. fFoldedColor.Background := clNone; @@ -139,6 +143,9 @@ begin fMouseLinkColor.Foreground := clNone; fMouseLinkColor.Background := clNone; // + fBracketMatchColor.Foreground:= clRed; + fBracketMatchColor.Background:= clNone; + // rightEdge := 80; tabulationWidth := 4; blockIdentation := 4; @@ -161,6 +168,7 @@ begin fSelCol.Free; fFoldedColor.Free; fMouseLinkColor.Free; + fBracketMatchColor.Free; inherited; end; @@ -176,6 +184,7 @@ begin fSelCol.Assign(srcopt.fSelCol); fFoldedColor.Assign(srcopt.fFoldedColor); fMouseLinkColor.Assign(srcopt.fMouseLinkColor); + fBracketMatchColor.Assign(srcopt.fBracketMatchColor); fD2Syn.Assign(srcopt.fD2Syn); fTxtSyn.Assign(srcopt.fTxtSyn); background := srcopt.background; @@ -212,6 +221,11 @@ begin fMouseLinkColor.Assign(aValue); end; +procedure TCEEditorOptionsBase.setBracketMatchColor(aValue: TSynSelectedColor); +begin + fBracketMatchColor.Assign(aValue); +end; + procedure TCEEditorOptionsBase.setD2Syn(aValue: TPersistent); begin D2Syn.Assign(aValue); @@ -330,6 +344,7 @@ begin anEditor.SelectedColor.Assign(fSelCol); anEditor.FoldedCodeColor.Assign(fFoldedColor); anEditor.MouseLinkColor.Assign(fMouseLinkColor); + anEditor.BracketMatchColor.Assign(fBracketMatchColor); anEditor.TabWidth := tabulationWidth; anEditor.BlockIndent := blockIdentation; anEditor.ExtraLineSpacing := lineSpacing; diff --git a/src/ce_search.lfm b/src/ce_search.lfm index 2c29be6a..905222f3 100644 --- a/src/ce_search.lfm +++ b/src/ce_search.lfm @@ -128,50 +128,62 @@ inherited CESearchWidget: TCESearchWidget Align = alClient BorderSpacing.Around = 4 Caption = 'Options' - ClientHeight = 79 + ClientHeight = 77 ClientWidth = 382 TabOrder = 3 object chkWWord: TCheckBox Left = 8 - Height = 19 + Height = 21 Top = 0 - Width = 82 + Width = 84 Caption = 'whole word' + Checked = True + State = cbChecked TabOrder = 0 end object chkBack: TCheckBox Left = 8 - Height = 19 + Height = 21 Top = 24 - Width = 71 + Width = 73 Caption = 'backward' - TabOrder = 1 + TabOrder = 2 end object chkFromCur: TCheckBox Left = 8 - Height = 19 + Height = 21 Top = 48 - Width = 82 + Width = 84 Caption = 'from cursor' Checked = True State = cbChecked - TabOrder = 2 + TabOrder = 3 end object chkCaseSens: TCheckBox Left = 128 - Height = 19 + Height = 21 Top = 0 - Width = 91 + Width = 93 Caption = 'case sensitive' - TabOrder = 3 + TabOrder = 4 end object chkPrompt: TCheckBox Left = 128 - Height = 19 + Height = 21 Top = 24 - Width = 60 + Width = 62 Caption = 'prompt' - TabOrder = 4 + TabOrder = 1 + end + object chkRegex: TCheckBox + Left = 128 + Height = 21 + Top = 48 + Width = 117 + Caption = 'regular expression' + Checked = True + State = cbChecked + TabOrder = 5 end end object btnReplaceAll: TBitBtn[4] @@ -232,25 +244,25 @@ inherited CESearchWidget: TCESearchWidget ClientWidth = 386 TabOrder = 5 object cbReplaceWth: TComboBox - Left = 90 + Left = 92 Height = 23 Top = 0 - Width = 296 + Width = 294 Align = alClient Anchors = [akTop, akLeft, akBottom] ItemHeight = 15 OnChange = cbReplaceWthChange - TabOrder = 0 + TabOrder = 1 end object chkEnableRep: TCheckBox Left = 0 Height = 23 Top = 0 - Width = 90 + Width = 92 Align = alLeft Caption = 'Replace with ' OnChange = chkEnableRepChange - TabOrder = 1 + TabOrder = 0 end end end diff --git a/src/ce_search.pas b/src/ce_search.pas index 4e37deae..78f2efdc 100644 --- a/src/ce_search.pas +++ b/src/ce_search.pas @@ -7,9 +7,12 @@ interface uses Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls, Menus, StdCtrls, actnList, Buttons, SynEdit, SynEditSearch, SynEditTypes, ce_common, - ce_widget, ce_synmemo, ce_interfaces, ce_observer; + ce_widget, ce_synmemo, ce_interfaces, ce_observer, SynEditHighlighter; type + + { TCESearchWidget } + TCESearchWidget = class(TCEWidget, ICEMultiDocObserver) btnFind: TBitBtn; btnReplace: TBitBtn; @@ -18,6 +21,7 @@ type cbReplaceWth: TComboBox; chkEnableRep: TCheckBox; chkPrompt: TCheckBox; + chkRegex: TCheckBox; chkWWord: TCheckBox; chkBack: TCheckBox; chkFromCur: TCheckBox; @@ -156,11 +160,12 @@ end; function TCESearchWidget.getOptions: TSynSearchOptions; begin - result := [ssoRegExpr]; - if chkWWord.Checked then result += [ssoWholeWord]; - if chkBack.Checked then result += [ssoBackwards]; - if chkCaseSens.Checked then result += [ssoMatchCase]; - if chkPrompt.Checked then result += [ssoPrompt]; + result := []; + if chkRegex.Checked then result += [ssoRegExpr]; + if chkWWord.Checked then result += [ssoWholeWord]; + if chkBack.Checked then result += [ssoBackwards]; + if chkCaseSens.Checked then result += [ssoMatchCase]; + if chkPrompt.Checked then result += [ssoPrompt]; end; function dlgReplaceAll: TModalResult; diff --git a/src/ce_tools.pas b/src/ce_tools.pas index 36b69786..4773d8bf 100644 --- a/src/ce_tools.pas +++ b/src/ce_tools.pas @@ -20,6 +20,7 @@ type fParameters: TStringList; fToolAlias: string; fQueryParams: boolean; + fClearMessages: boolean; fChainBefore: TStringList; fChainAfter: TStringList; fShortcut: TShortcut; @@ -37,6 +38,7 @@ type property parameters: TStringList read fParameters write setParameters; property showWindows: TShowWindowOptions read fShowWin write fShowWin; property queryParameters: boolean read fQueryParams write fQueryParams; + property clearMessages: boolean read fClearMessages write fClearMessages; property chainBefore: TStringList read fChainBefore write setchainBefore; property chainAfter: TStringList read fChainAfter write setChainAfter; property shortcut: TShortcut read fShortcut write fShortcut; @@ -135,6 +137,9 @@ var begin killProcess(fProcess); // + if fClearMessages then + getMessageDisplay(fMsgs).clearByContext(amcMisc); + // fProcess := TCheckedAsyncProcess.Create(nil); fProcess.OnReadData:= @processOutput; fProcess.OnTerminate:= @processOutput;