mirror of https://gitlab.com/basile.b/dexed.git
implement #25 but not enabled
This commit is contained in:
parent
a6c8767dc0
commit
207f9276d6
|
@ -58,6 +58,7 @@ type
|
|||
fCompletionMenuWidth: integer;
|
||||
fCompletionMenuLines: Byte;
|
||||
fAutoCLoseCurlyBrace: TBraceAutoCloseStyle;
|
||||
fCtrlDisableAutoClose: boolean;
|
||||
//
|
||||
procedure setFont(value: TFont);
|
||||
procedure setSelCol(value: TSynSelectedColor);
|
||||
|
@ -83,6 +84,7 @@ type
|
|||
property completionMenuCaseCare: boolean read fCompletionMenuCaseCare write fCompletionMenuCaseCare;
|
||||
property completionMenuLines: byte read fCompletionMenuLines write setCompletionMenuLines;
|
||||
property completionMenuWidth: integer read fCompletionMenuWidth write fCompletionMenuWidth;
|
||||
//property ctrlDisableAutoClose: boolean read fCtrlDisableAutoClose write fCtrlDisableAutoClose default true;
|
||||
property currentLine: TSynSelectedColor read fCurrLineAttribs write setCurrLineAttribs;
|
||||
property ddocDelay: Integer read fDDocDelay write setDDocDelay;
|
||||
property folding: TSynSelectedColor read fFoldedColor write setFoldedColor;
|
||||
|
@ -217,6 +219,7 @@ begin
|
|||
fCurrLineAttribs.Background := fBackground - $080808;
|
||||
fCurrLineAttribs.Foreground := clNone;
|
||||
//
|
||||
fCtrlDisableAutoClose := true;
|
||||
options1 :=
|
||||
[eoAutoIndent, eoBracketHighlight, eoGroupUndo, eoTabsToSpaces, eoTrimTrailingSpaces,
|
||||
eoDragDropEditing, eoShowCtrlMouseLinks, eoEnhanceHomeKey, eoTabIndent];
|
||||
|
@ -263,6 +266,7 @@ begin
|
|||
begin
|
||||
srcopt := TCEEditorOptionsBase(src);
|
||||
//
|
||||
fCtrlDisableAutoClose:=srcopt.fCtrlDisableAutoClose;
|
||||
fResetFontSize:=srcopt.fResetFontSize;
|
||||
fAutoCLoseCurlyBrace := srcopt.fAutoCLoseCurlyBrace;
|
||||
fCompletionMenuWidth:=srcopt.fCompletionMenuWidth;
|
||||
|
@ -608,6 +612,7 @@ begin
|
|||
if not fResetFontSize then
|
||||
anEditor.Font.Size := savedSize;
|
||||
|
||||
anEditor.ctrlDisableAutoClose := fCtrlDisableAutoClose;
|
||||
anEditor.autoCloseCurlyBrace := fAutoCLoseCurlyBrace;
|
||||
anEditor.completionMenu.TheForm.Width := fCompletionMenuWidth;
|
||||
anEditor.completionMenu.LinesInWindow := fCompletionMenuLines;
|
||||
|
|
|
@ -140,6 +140,8 @@ type
|
|||
fOverrideColMode: boolean;
|
||||
fAutoCloseCurlyBrace: TBraceAutoCloseStyle;
|
||||
fLexToks: TLexTokenList;
|
||||
fCtrlDisableAutoClose: boolean;
|
||||
fShiftState: TShiftState;
|
||||
procedure setMatchOpts(value: TIdentifierMatchOptions);
|
||||
function getMouseFileBytePos: Integer;
|
||||
procedure changeNotify(Sender: TObject);
|
||||
|
@ -223,6 +225,7 @@ type
|
|||
property ddocDelay: Integer read fDDocDelay write setDDocDelay;
|
||||
property autoDotDelay: Integer read fAutoDotDelay write setAutoDotDelay;
|
||||
property autoCloseCurlyBrace: TBraceAutoCloseStyle read fAutoCloseCurlyBrace write fAutoCloseCurlyBrace;
|
||||
property ctrlDisableAutoClose: boolean read fCtrlDisableAutoClose write fCtrlDisableAutoClose;
|
||||
end;
|
||||
|
||||
procedure SetDefaultCoeditKeystrokes(ed: TSynEdit);
|
||||
|
@ -1389,6 +1392,7 @@ end;
|
|||
procedure TCESynMemo.KeyDown(var Key: Word; Shift: TShiftState);
|
||||
begin
|
||||
inherited;
|
||||
//fShiftState := Shift;
|
||||
highlightCurrentIdentifier;
|
||||
if fCompletion.IsActive then
|
||||
fCompletion.CurrentString:= GetWordAtRowCol(LogicalCaretXY);
|
||||
|
@ -1444,7 +1448,10 @@ begin
|
|||
else
|
||||
showCallTips(fCallTipStrings.Text);
|
||||
end;
|
||||
'{': case fAutoCloseCurlyBrace of
|
||||
'{':
|
||||
//if (not fCtrlDisableAutoClose) or
|
||||
// (fCtrlDisableAutoClose and (not (ssCtrl in fShiftState))) then
|
||||
case fAutoCloseCurlyBrace of
|
||||
autoCloseAlways:
|
||||
curlyBraceCloseAndIndent(self);
|
||||
autoCloseAtEof:
|
||||
|
|
Loading…
Reference in New Issue