mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 07:17:23 +02:00
codetools: fixed GetIdentStartEndAtPosition if pos behind source
git-svn-id: branches/fixes_1_8@56199 -
This commit is contained in:
parent
86165e04d5
commit
7626be6016
@ -1823,11 +1823,13 @@ begin
|
|||||||
while (IdentEnd<=length(Source))
|
while (IdentEnd<=length(Source))
|
||||||
and (IsIdentChar[Source[IdentEnd]]) do
|
and (IsIdentChar[Source[IdentEnd]]) do
|
||||||
inc(IdentEnd);
|
inc(IdentEnd);
|
||||||
while (IdentStart<IdentEnd)
|
while (IdentStart<Position)
|
||||||
and (not IsIdentStartChar[Source[IdentStart]]) do
|
and (not IsIdentStartChar[Source[IdentStart]]) do
|
||||||
inc(IdentStart);
|
inc(IdentStart);
|
||||||
if (IdentStart>1) and (Source[IdentStart-1]='&') then
|
if (IdentStart>1) and (Source[IdentStart-1]='&') then
|
||||||
dec(IdentStart);
|
dec(IdentStart);
|
||||||
|
if (IdentStart>length(Source)) or not IsIdentStartChar[Source[IdentStart]] then
|
||||||
|
IdentEnd:=IdentStart;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function GetIdentStartPosition(const Source: string; Position: integer
|
function GetIdentStartPosition(const Source: string; Position: integer
|
||||||
|
Loading…
Reference in New Issue
Block a user