mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-25 13:43:15 +02:00
IDE: EditorMacros, fix generating error msg (avoid index out of range error). Fix type in test for whitespace. Issue #0036082
git-svn-id: trunk@61898 -
This commit is contained in:
parent
76d23f638b
commit
ad89fb55f9
@ -792,8 +792,14 @@ var
|
||||
begin
|
||||
f := TStringList.Create;
|
||||
f.Text := copy(FOrigText,1 ,FPos);
|
||||
Result.y := f.Count;
|
||||
Result.x := length(f[f.Count-1])+1;
|
||||
if f.Count = 0 then begin
|
||||
Result.y := 1;
|
||||
Result.x := 1;
|
||||
end
|
||||
else begin
|
||||
Result.y := f.Count;
|
||||
Result.x := length(f[f.Count-1])+1;
|
||||
end;
|
||||
f.Free;
|
||||
end;
|
||||
|
||||
@ -848,11 +854,13 @@ end;
|
||||
function TIdeMacroEventReader.ParseNextEvent: Boolean;
|
||||
procedure SkipNum(var i: integer);
|
||||
begin
|
||||
while (i <= Length(FText)) and (FText[i] in ['0'..'9']) do inc (i);
|
||||
while (i <= Length(FText)) and (FText[i] in ['0'..'9']) do
|
||||
inc(i);
|
||||
end;
|
||||
procedure SkipSpace(var i: integer);
|
||||
begin
|
||||
while (i <= Length(FText)) and (FText[i] in [' '..#9, #13, #10]) do inc (i);
|
||||
while (i <= Length(FText)) and (FText[i] in [' ', #9, #13, #10]) do
|
||||
inc(i);
|
||||
end;
|
||||
var
|
||||
c,i,j,k: Integer;
|
||||
|
Loading…
Reference in New Issue
Block a user