mirror of https://gitlab.com/basile.b/dexed.git
fix, auto brace closing indent error when option eoAutoIdent was set
This commit is contained in:
parent
c864a0ce50
commit
467d7abeb1
|
@ -214,7 +214,7 @@ begin
|
||||||
fCurrLineAttribs.Foreground := clNone;
|
fCurrLineAttribs.Foreground := clNone;
|
||||||
//
|
//
|
||||||
options1 :=
|
options1 :=
|
||||||
[eoAutoIndent, eoBracketHighlight, eoGroupUndo, eoTabsToSpaces,
|
[eoAutoIndent, eoBracketHighlight, eoGroupUndo, eoTabsToSpaces, eoTrimTrailingSpaces,
|
||||||
eoDragDropEditing, eoShowCtrlMouseLinks, eoEnhanceHomeKey, eoTabIndent];
|
eoDragDropEditing, eoShowCtrlMouseLinks, eoEnhanceHomeKey, eoTabIndent];
|
||||||
options2 :=
|
options2 :=
|
||||||
[eoEnhanceEndKey, eoFoldedCopyPaste, eoOverwriteBlock];
|
[eoEnhanceEndKey, eoFoldedCopyPaste, eoOverwriteBlock];
|
||||||
|
|
|
@ -790,11 +790,13 @@ begin
|
||||||
editor.CommandProcessor(ecDown, '', nil);
|
editor.CommandProcessor(ecDown, '', nil);
|
||||||
editor.CommandProcessor(ecInsertLine, '', nil);
|
editor.CommandProcessor(ecInsertLine, '', nil);
|
||||||
editor.CommandProcessor(ecDown, '', nil);
|
editor.CommandProcessor(ecDown, '', nil);
|
||||||
for j := 1 to i do editor.CommandProcessor(ecChar, beg[j], nil);
|
if not (eoAutoIndent in editor.Options) then
|
||||||
|
for j := 1 to i do editor.CommandProcessor(ecChar, beg[j], nil);
|
||||||
editor.CommandProcessor(ecChar, '}', nil);
|
editor.CommandProcessor(ecChar, '}', nil);
|
||||||
editor.CommandProcessor(ecUp, '', nil);
|
editor.CommandProcessor(ecUp, '', nil);
|
||||||
for j := 1 to i do editor.CommandProcessor(ecChar, beg[j], nil);
|
for j := 1 to i do editor.CommandProcessor(ecChar, beg[j], nil);
|
||||||
editor.CommandProcessor(ecTab, '', nil);
|
if not (eoAutoIndent in editor.Options) then
|
||||||
|
editor.CommandProcessor(ecTab, '', nil);
|
||||||
editor.EndUndoBlock;
|
editor.EndUndoBlock;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -1533,7 +1535,7 @@ function TCESynMemo.BreakPointLine(index: integer): integer;
|
||||||
begin
|
begin
|
||||||
if index >= fBreakPoints.Count then
|
if index >= fBreakPoints.Count then
|
||||||
exit(0);
|
exit(0);
|
||||||
{$PUSH}{$WARNINGS OFF}
|
{$PUSH}{$WARNINGS OFF}{$HINTS OFF}
|
||||||
exit(Integer(fBreakPoints.Items[index]));
|
exit(Integer(fBreakPoints.Items[index]));
|
||||||
{$POP}
|
{$POP}
|
||||||
end;
|
end;
|
||||||
|
@ -1550,7 +1552,7 @@ begin
|
||||||
m.ImageIndex := 0;
|
m.ImageIndex := 0;
|
||||||
m.Visible := true;
|
m.Visible := true;
|
||||||
Marks.Add(m);
|
Marks.Add(m);
|
||||||
{$PUSH}{$WARNINGS OFF}
|
{$PUSH}{$WARNINGS OFF}{$HINTS OFF}
|
||||||
fBreakPoints.Add(pointer(line));
|
fBreakPoints.Add(pointer(line));
|
||||||
{$POP}
|
{$POP}
|
||||||
if assigned(fBreakpointEvent) then
|
if assigned(fBreakpointEvent) then
|
||||||
|
@ -1563,7 +1565,7 @@ begin
|
||||||
exit;
|
exit;
|
||||||
if marks.Line[line].isNotNil and (marks.Line[line].Count > 0) then
|
if marks.Line[line].isNotNil and (marks.Line[line].Count > 0) then
|
||||||
marks.Line[line].Clear(true);
|
marks.Line[line].Clear(true);
|
||||||
{$PUSH}{$WARNINGS OFF}
|
{$PUSH}{$WARNINGS OFF}{$HINTS OFF}
|
||||||
fBreakPoints.Remove(pointer(line));
|
fBreakPoints.Remove(pointer(line));
|
||||||
{$POP}
|
{$POP}
|
||||||
if assigned(fBreakpointEvent) then
|
if assigned(fBreakpointEvent) then
|
||||||
|
@ -1572,7 +1574,7 @@ end;
|
||||||
|
|
||||||
function TCESynMemo.findBreakPoint(line: integer): boolean;
|
function TCESynMemo.findBreakPoint(line: integer): boolean;
|
||||||
begin
|
begin
|
||||||
{$PUSH}{$WARNINGS OFF}
|
{$PUSH}{$WARNINGS OFF}{$HINTS OFF}
|
||||||
exit(fBreakPoints.IndexOf(pointer(line)) <> -1);
|
exit(fBreakPoints.IndexOf(pointer(line)) <> -1);
|
||||||
{$POP}
|
{$POP}
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue