mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 11:39:23 +02:00
SynEdit: fixed using for-var after loop.
This commit is contained in:
parent
7b77a98bcf
commit
b50acfc112
@ -439,9 +439,12 @@ begin
|
|||||||
(CurrentEditor.CaretX -1 <= Length(iString)) then
|
(CurrentEditor.CaretX -1 <= Length(iString)) then
|
||||||
begin
|
begin
|
||||||
iIdentChars := CurrentEditor.IdentChars;
|
iIdentChars := CurrentEditor.IdentChars;
|
||||||
for cCol := CurrentEditor.CaretX -1 downto 1 do
|
cCol := CurrentEditor.CaretX -1;
|
||||||
|
while cCol > 0 do begin
|
||||||
if not (iString[cCol] in iIdentChars) then
|
if not (iString[cCol] in iIdentChars) then
|
||||||
break;
|
break;
|
||||||
|
dec(cCol);
|
||||||
|
end;
|
||||||
Result := Copy( iString, cCol +1, CurrentEditor.CaretX - cCol -1);
|
Result := Copy( iString, cCol +1, CurrentEditor.CaretX - cCol -1);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user