mirror of https://gitlab.com/basile.b/dexed.git
faster indent patching
This commit is contained in:
parent
cfaf09bd44
commit
4cc7eef0d9
|
@ -1471,7 +1471,7 @@ function TCESynMemo.indentationMode: TIndentationMode;
|
||||||
u := Lines[index];
|
u := Lines[index];
|
||||||
if (u.length > 0) and (u[1] = #9) then
|
if (u.length > 0) and (u[1] = #9) then
|
||||||
result := imTabs
|
result := imTabs
|
||||||
else if (u.length >= self.TabWidth) and u.StartsWith(b[0..TabWidth-1]) then
|
else if (u.length >= TabWidth) and u.StartsWith(b[0..TabWidth-1]) then
|
||||||
result := imSpaces;
|
result := imSpaces;
|
||||||
end;
|
end;
|
||||||
var
|
var
|
||||||
|
@ -1500,6 +1500,7 @@ var
|
||||||
i: integer;
|
i: integer;
|
||||||
begin
|
begin
|
||||||
assert(w > 0);
|
assert(w > 0);
|
||||||
|
lines.BeginUpdate;
|
||||||
for i:= 0 to lines.Count-1 do
|
for i:= 0 to lines.Count-1 do
|
||||||
case m of
|
case m of
|
||||||
imTabs:
|
imTabs:
|
||||||
|
@ -1513,6 +1514,7 @@ begin
|
||||||
fModified:=true;
|
fModified:=true;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
lines.EndUpdate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TCESynMemo.insertLeadingDDocSymbol(c: char);
|
procedure TCESynMemo.insertLeadingDDocSymbol(c: char);
|
||||||
|
|
Loading…
Reference in New Issue