mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 21:41:35 +02:00
SynEdit: fixed using for-var after loop.
(cherry picked from commit b50acfc112
)
This commit is contained in:
parent
7bd31885b9
commit
87aa99d601
@ -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