mirror of https://gitlab.com/basile.b/dexed.git
prevent to systematically lex on new line
This commit is contained in:
parent
8972a689a7
commit
4adccd5275
|
@ -2545,6 +2545,7 @@ procedure TCESynMemo.KeyDown(var Key: Word; Shift: TShiftState);
|
||||||
var
|
var
|
||||||
line: string;
|
line: string;
|
||||||
ddc: char;
|
ddc: char;
|
||||||
|
lxd: boolean;
|
||||||
begin
|
begin
|
||||||
case Key of
|
case Key of
|
||||||
VK_BACK: if fCallTipWin.Visible and (CaretX > 1)
|
VK_BACK: if fCallTipWin.Visible and (CaretX > 1)
|
||||||
|
@ -2571,11 +2572,13 @@ begin
|
||||||
if (fAutoCloseCurlyBrace = autoCloseOnNewLineLexically) or
|
if (fAutoCloseCurlyBrace = autoCloseOnNewLineLexically) or
|
||||||
fSmartDdocNewline then
|
fSmartDdocNewline then
|
||||||
begin
|
begin
|
||||||
fLexToks.Clear;
|
lxd := false;
|
||||||
lex(lines.Text, fLexToks);
|
|
||||||
if (LogicalCaretXY.X - 1 >= line.length)
|
if (LogicalCaretXY.X - 1 >= line.length)
|
||||||
or isBlank(line[LogicalCaretXY.X .. line.length]) then
|
or isBlank(line[LogicalCaretXY.X .. line.length]) then
|
||||||
begin
|
begin
|
||||||
|
lxd := true;
|
||||||
|
fLexToks.Clear;
|
||||||
|
lex(lines.Text, fLexToks);
|
||||||
if lexCanCloseBrace then
|
if lexCanCloseBrace then
|
||||||
begin
|
begin
|
||||||
Key := 0;
|
Key := 0;
|
||||||
|
@ -2584,6 +2587,11 @@ begin
|
||||||
end;
|
end;
|
||||||
if (fSmartDdocNewline) then
|
if (fSmartDdocNewline) then
|
||||||
begin
|
begin
|
||||||
|
if not lxd then
|
||||||
|
begin
|
||||||
|
fLexToks.Clear;
|
||||||
|
lex(lines.Text, fLexToks);
|
||||||
|
end;
|
||||||
ddc := lexInDdoc;
|
ddc := lexInDdoc;
|
||||||
if ddc in ['*', '+'] then
|
if ddc in ['*', '+'] then
|
||||||
begin
|
begin
|
||||||
|
|
Loading…
Reference in New Issue