mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-12 03:56:12 +02:00
codetools: TStandardCodeTool.ExtractOperand ignore positions in space
git-svn-id: trunk@22558 -
This commit is contained in:
parent
bdb43b2c28
commit
555090ae4f
@ -704,6 +704,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TSourceLog.LineColIsSpace(Line, Column: integer): boolean;
|
function TSourceLog.LineColIsSpace(Line, Column: integer): boolean;
|
||||||
|
// check if there is a non space character in front of or at Line,Column
|
||||||
var
|
var
|
||||||
p: PChar;
|
p: PChar;
|
||||||
rg: PLineRange;
|
rg: PLineRange;
|
||||||
|
@ -3577,6 +3577,7 @@ var
|
|||||||
begin
|
begin
|
||||||
Result:=false;
|
Result:=false;
|
||||||
Operand:='';
|
Operand:='';
|
||||||
|
if CursorPos.Code.LineColIsSpace(CursorPos.Y,CursorPos.X) then exit;
|
||||||
BuildTreeAndGetCleanPos(trAll,CursorPos,CleanPos,[]);
|
BuildTreeAndGetCleanPos(trAll,CursorPos,CleanPos,[]);
|
||||||
Node:=FindDeepestNodeAtPos(CleanPos,true);
|
Node:=FindDeepestNodeAtPos(CleanPos,true);
|
||||||
StartPos:=FindStartOfTerm(CleanPos,NodeTermInType(Node));
|
StartPos:=FindStartOfTerm(CleanPos,NodeTermInType(Node));
|
||||||
|
Loading…
Reference in New Issue
Block a user