mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-09-13 12:39:15 +02:00
SourceEditor/SynCompletion: Don't steal focus after completion drop-down, if user moved to different form
git-svn-id: trunk@26543 -
This commit is contained in:
parent
29839a9707
commit
dd3878df30
@ -1501,8 +1501,6 @@ begin
|
|||||||
//debugln(GetStackTrace(true));
|
//debugln(GetStackTrace(true));
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
Manager.DeactivateCompletionForm;
|
Manager.DeactivateCompletionForm;
|
||||||
if Manager.ActiveEditor<>nil then
|
|
||||||
Manager.ActiveEditor.FocusEditor;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSourceEditCompletion.ccComplete(var Value: string;
|
procedure TSourceEditCompletion.ccComplete(var Value: string;
|
||||||
@ -7863,6 +7861,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSourceEditorManagerBase.DeactivateCompletionForm;
|
procedure TSourceEditorManagerBase.DeactivateCompletionForm;
|
||||||
|
var
|
||||||
|
PluginFocused: Boolean;
|
||||||
begin
|
begin
|
||||||
if ActiveCompletionPlugin<>nil then begin
|
if ActiveCompletionPlugin<>nil then begin
|
||||||
ActiveCompletionPlugin.Cancel;
|
ActiveCompletionPlugin.Cancel;
|
||||||
@ -7874,13 +7874,16 @@ begin
|
|||||||
then
|
then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
|
// Do not move focus, if it was moved by user
|
||||||
|
PluginFocused := FDefaultCompletionForm.TheForm.Focused;
|
||||||
|
|
||||||
// clear the IdentifierList (otherwise it would try to update everytime
|
// clear the IdentifierList (otherwise it would try to update everytime
|
||||||
// the codetools are used)
|
// the codetools are used)
|
||||||
CodeToolBoss.IdentifierList.Clear;
|
CodeToolBoss.IdentifierList.Clear;
|
||||||
FDefaultCompletionForm.CurrentCompletionType:=ctNone;
|
FDefaultCompletionForm.CurrentCompletionType:=ctNone;
|
||||||
FDefaultCompletionForm.Deactivate;
|
FDefaultCompletionForm.Deactivate;
|
||||||
|
|
||||||
if ActiveEditor<>nil then begin
|
if PluginFocused and (ActiveEditor<>nil) then begin
|
||||||
//LCLIntf.ShowCaret(ActSE.EditorComponent.Handle);
|
//LCLIntf.ShowCaret(ActSE.EditorComponent.Handle);
|
||||||
TSourceEditor(ActiveEditor).EditorComponent.SetFocus;
|
TSourceEditor(ActiveEditor).EditorComponent.SetFocus;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user