mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 09:56:12 +02:00
IDE: "Rename Identifier": show replaced lines in result. (FIx nil deref)
git-svn-id: trunk@39556 -
This commit is contained in:
parent
fd62b97730
commit
f6c4b6b46c
@ -2567,13 +2567,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
LastCodePos := CurCodePos;
|
LastCodePos := CurCodePos;
|
||||||
|
ANode2 := ANode;
|
||||||
ANode:=TreeOfPCodeXYPosition.FindSuccessor(ANode);
|
ANode:=TreeOfPCodeXYPosition.FindSuccessor(ANode);
|
||||||
|
|
||||||
if (ANode = nil) or (PCodeXYPosition(ANode.Data)^.Code <> LastCodePos^.Code) or
|
if (ANode = nil) or (PCodeXYPosition(ANode.Data)^.Code <> LastCodePos^.Code) or
|
||||||
(PCodeXYPosition(ANode.Data)^.Y <> LastCodePos^.Y)
|
(PCodeXYPosition(ANode.Data)^.Y <> LastCodePos^.Y)
|
||||||
then begin
|
then begin
|
||||||
if (SameLineCount > 0) then begin
|
if (SameLineCount > 0) then begin
|
||||||
ANode2 := TreeOfPCodeXYPosition.FindPrecessor(ANode); // Get to the first node of that line again. That node does not need to be modified
|
|
||||||
for i := 1 to SameLineCount do begin
|
for i := 1 to SameLineCount do begin
|
||||||
ANode2 := TreeOfPCodeXYPosition.FindPrecessor(ANode2);
|
ANode2 := TreeOfPCodeXYPosition.FindPrecessor(ANode2);
|
||||||
PCodeXYPosition(ANode2.Data)^.X := PCodeXYPosition(ANode2.Data)^.X + i * IdentLenDiff;
|
PCodeXYPosition(ANode2.Data)^.X := PCodeXYPosition(ANode2.Data)^.X + i * IdentLenDiff;
|
||||||
|
Loading…
Reference in New Issue
Block a user