mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 08:32:35 +02:00
codetools: identifier completion: fixed line index
git-svn-id: trunk@22519 -
This commit is contained in:
parent
e50ada8891
commit
0fd3251391
@ -1514,7 +1514,8 @@ begin
|
||||
|
||||
// get identifier position
|
||||
GetIdentStartEndAtPosition(Src,CleanCursorPos,IdentStartPos,IdentEndPos);
|
||||
if CursorPos.X>CursorPos.Code.GetLineLength(CursorPos.Y)+1 then
|
||||
//DebugLn(['TIdentCompletionTool.ParseSourceTillCollectionStart ',dbgstr(copy(Src,IdentStartPos,10)),' CursorPos.X=',CursorPos.X,' LineLen=',CursorPos.Code.GetLineLength(CursorPos.Y-1),' ',CursorPos.Code.getline(CursorPos.Y-1)]);
|
||||
if CursorPos.X>CursorPos.Code.GetLineLength(CursorPos.Y-1)+1 then
|
||||
IdentStartPos:=IdentEndPos;
|
||||
end;
|
||||
|
||||
@ -1552,7 +1553,7 @@ procedure TIdentCompletionTool.FindCollectionContext(
|
||||
MoveCursorToCleanPos(IdentStartPos);
|
||||
ReadPriorAtom;
|
||||
if (CurPos.Flag=cafPoint)
|
||||
or (UpAtomIs('INHERITED')) then begin
|
||||
or UpAtomIs('INHERITED') then begin
|
||||
Result:=FindStartOfTerm(IdentStartPos,NodeTermInType(ContextNode));
|
||||
if Result<ContextNode.StartPos then
|
||||
Result:=ContextNode.StartPos;
|
||||
|
Loading…
Reference in New Issue
Block a user