mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-21 19:40:42 +01:00
IDE: completion box: fixed cancel execution on error
git-svn-id: trunk@22057 -
This commit is contained in:
parent
df7648cf43
commit
bf25b88f22
@ -4124,11 +4124,15 @@ Begin
|
|||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
CurCompletionControl := Sender as TSynCompletion;
|
CurCompletionControl := Sender as TSynCompletion;
|
||||||
S := TStringList.Create;
|
S := TStringList.Create;
|
||||||
|
try
|
||||||
Prefix := CurCompletionControl.CurrentString;
|
Prefix := CurCompletionControl.CurrentString;
|
||||||
CurEdit:=GetActiveSE.EditorComponent;
|
CurEdit:=GetActiveSE.EditorComponent;
|
||||||
case CurrentCompletionType of
|
case CurrentCompletionType of
|
||||||
ctIdentCompletion:
|
ctIdentCompletion:
|
||||||
if not InitIdentCompletion(S) then exit;
|
if not InitIdentCompletion(S) then begin
|
||||||
|
CurCompletionControl.ItemList.Clear;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
|
||||||
ctWordCompletion:
|
ctWordCompletion:
|
||||||
begin
|
begin
|
||||||
@ -4152,7 +4156,9 @@ Begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
CurCompletionControl.ItemList := S;
|
CurCompletionControl.ItemList := S;
|
||||||
|
finally
|
||||||
S.Free;
|
S.Free;
|
||||||
|
end;
|
||||||
CurCompletionControl.CurrentString:=Prefix;
|
CurCompletionControl.CurrentString:=Prefix;
|
||||||
// set colors
|
// set colors
|
||||||
if (CurEdit<>nil) and (CurCompletionControl.TheForm<>nil) then begin
|
if (CurEdit<>nil) and (CurCompletionControl.TheForm<>nil) then begin
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user