mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-29 17:30:53 +02:00
partial workaround for issue #0032972 / prevent IDE from crashing / but now the exception is ignored
git-svn-id: trunk@58535 -
This commit is contained in:
parent
6f9cdaefbe
commit
569382adec
@ -2598,36 +2598,41 @@ var
|
|||||||
hl: TSynCustomHighlighter;
|
hl: TSynCustomHighlighter;
|
||||||
Colors: TPaintCompletionItemColors;
|
Colors: TPaintCompletionItemColors;
|
||||||
begin
|
begin
|
||||||
with ACanvas do begin
|
try
|
||||||
if (Editor<>nil) then
|
with ACanvas do begin
|
||||||
Font := Editor.Font
|
if (Editor<>nil) then
|
||||||
else begin
|
Font := Editor.Font
|
||||||
Font.Size:=EditorOpts.EditorFontSize; // set Size before name for XLFD !
|
else begin
|
||||||
Font.Name:=EditorOpts.EditorFont;
|
Font.Size:=EditorOpts.EditorFontSize; // set Size before name for XLFD !
|
||||||
|
Font.Name:=EditorOpts.EditorFont;
|
||||||
|
end;
|
||||||
|
Font.Style:=[];
|
||||||
end;
|
end;
|
||||||
Font.Style:=[];
|
Colors.BackgroundColor := FActiveEditBackgroundColor;
|
||||||
end;
|
Colors.BackgroundSelectedColor := FActiveEditBackgroundSelectedColor;
|
||||||
Colors.BackgroundColor := FActiveEditBackgroundColor;
|
Colors.TextColor := FActiveEditTextColor;
|
||||||
Colors.BackgroundSelectedColor := FActiveEditBackgroundSelectedColor;
|
Colors.TextSelectedColor := FActiveEditTextSelectedColor;
|
||||||
Colors.TextColor := FActiveEditTextColor;
|
Colors.TextHilightColor := FActiveEditTextHighLightColor;
|
||||||
Colors.TextSelectedColor := FActiveEditTextSelectedColor;
|
MaxX:=TheForm.ClientWidth;
|
||||||
Colors.TextHilightColor := FActiveEditTextHighLightColor;
|
t:=CurrentCompletionType;
|
||||||
MaxX:=TheForm.ClientWidth;
|
if Manager.ActiveCompletionPlugin<>nil then
|
||||||
t:=CurrentCompletionType;
|
|
||||||
if Manager.ActiveCompletionPlugin<>nil then
|
|
||||||
begin
|
|
||||||
if Manager.ActiveCompletionPlugin.HasCustomPaint then
|
|
||||||
begin
|
begin
|
||||||
Manager.ActiveCompletionPlugin.PaintItem(AKey,ACanvas,X,Y,ItemSelected,Index);
|
if Manager.ActiveCompletionPlugin.HasCustomPaint then
|
||||||
end else begin
|
begin
|
||||||
t:=ctWordCompletion;
|
Manager.ActiveCompletionPlugin.PaintItem(AKey,ACanvas,X,Y,ItemSelected,Index);
|
||||||
|
end else begin
|
||||||
|
t:=ctWordCompletion;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
hl := nil;
|
||||||
|
if Editor <> nil then
|
||||||
|
hl := Editor.Highlighter;
|
||||||
|
PaintCompletionItem(AKey, ACanvas, X, Y, MaxX, ItemSelected, Index, self, t, hl, @Colors);
|
||||||
|
Result:=true;
|
||||||
|
except
|
||||||
|
DebugLn('OnSynCompletionPaintItem failed');
|
||||||
|
Result := false;
|
||||||
end;
|
end;
|
||||||
hl := nil;
|
|
||||||
if Editor <> nil then
|
|
||||||
hl := Editor.Highlighter;
|
|
||||||
PaintCompletionItem(AKey, ACanvas, X, Y, MaxX, ItemSelected, Index, self, t, hl, @Colors);
|
|
||||||
Result:=true;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TSourceEditCompletion.OnSynCompletionMeasureItem(const AKey: string;
|
function TSourceEditCompletion.OnSynCompletionMeasureItem(const AKey: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user