mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 10:09:32 +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))
|
||||
and (IsIdentChar[Source[IdentEnd]]) do
|
||||
inc(IdentEnd);
|
||||
while (IdentStart<IdentEnd)
|
||||
while (IdentStart<Position)
|
||||
and (not IsIdentStartChar[Source[IdentStart]]) do
|
||||
inc(IdentStart);
|
||||
if (IdentStart>1) and (Source[IdentStart-1]='&') then
|
||||
dec(IdentStart);
|
||||
if (IdentStart>length(Source)) or not IsIdentStartChar[Source[IdentStart]] then
|
||||
IdentEnd:=IdentStart;
|
||||
end;
|
||||
|
||||
function GetIdentStartPosition(const Source: string; Position: integer
|
||||
|
Loading…
Reference in New Issue
Block a user