mirror of https://gitlab.com/basile.b/dexed.git
fix, mess between options and custom commands
This commit is contained in:
parent
26817c0fd9
commit
d04fd37b2e
|
@ -771,7 +771,6 @@ var
|
||||||
beg: string;
|
beg: string;
|
||||||
i: integer = 1;
|
i: integer = 1;
|
||||||
j: integer;
|
j: integer;
|
||||||
opts: TSynEditorOptions;
|
|
||||||
const
|
const
|
||||||
blk = [' ', #9];
|
blk = [' ', #9];
|
||||||
begin
|
begin
|
||||||
|
@ -786,20 +785,19 @@ begin
|
||||||
i += 1;
|
i += 1;
|
||||||
end;
|
end;
|
||||||
i -= 1;
|
i -= 1;
|
||||||
opts := editor.Options;
|
|
||||||
editor.Options := opts - [eoAutoIndent, eoTrimTrailingSpaces];
|
|
||||||
editor.BeginUndoBlock;
|
editor.BeginUndoBlock;
|
||||||
editor.CommandProcessor(ecInsertLine, '', nil);
|
editor.CommandProcessor(ecInsertLine, '', nil);
|
||||||
editor.CommandProcessor(ecDown, '', nil);
|
editor.CommandProcessor(ecDown, '', nil);
|
||||||
editor.CommandProcessor(ecInsertLine, '', nil);
|
editor.CommandProcessor(ecInsertLine, '', nil);
|
||||||
editor.CommandProcessor(ecDown, '', nil);
|
editor.CommandProcessor(ecDown, '', nil);
|
||||||
|
editor.CommandProcessor(ecLineStart, '', 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(ecChar, '}', nil);
|
editor.CommandProcessor(ecChar, '}', nil);
|
||||||
editor.CommandProcessor(ecUp, '', nil);
|
editor.CommandProcessor(ecUp, '', nil);
|
||||||
|
editor.CommandProcessor(ecLineStart, '', 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);
|
editor.CommandProcessor(ecTab, '', nil);
|
||||||
editor.EndUndoBlock;
|
editor.EndUndoBlock;
|
||||||
editor.Options := opts;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure commentSelection(editor: TSynEdit);
|
procedure commentSelection(editor: TSynEdit);
|
||||||
|
|
Loading…
Reference in New Issue