View Issue Details

IDProjectCategoryView StatusLast Update
0029482LazarusIDEpublic2019-03-15 23:17
ReporterBBazAssigned ToJuha Manninen 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version1.6RC1Product Build 
Target VersionFixed in Version 
Summary0029482: Delay for hints and completion box should not share the same value
DescriptionI find useful to have a very responsive completion box but a longer delay to display the hints since when hints are displayed too fast it tends to prevent positioning of the carret after mouse motion.

Unfortunately the delay for the two features share the same setting ("Delay for hints and completion box").
TagsNo tags attached.
Fixed in Revisionr60691
LazTarget-
Widgetset
Attached Files
  • hints-completionbox.patch (12,691 bytes)
    Index: editoroptions.pp
    ===================================================================
    --- editoroptions.pp	(wersja 60403)
    +++ editoroptions.pp	(kopia robocza)
    @@ -1455,6 +1455,7 @@
         fAutoBlockCompletion: Boolean;
         fAutoCodeParameters: Boolean;
         fAutoDelayInMSec: Integer;
    +    fAutoHintDelayInMSec: Integer;
         FAutoRemoveEmptyMethods: Boolean;
         fAutoToolTipExprEval: Boolean;
         fAutoToolTipSymbTools: Boolean;
    @@ -1661,6 +1662,8 @@
       public
         property AutoDelayInMSec: Integer read fAutoDelayInMSec
           write fAutoDelayInMSec default 1000;
    +    property AutoHintDelayInMSec: Integer read fAutoHintDelayInMSec
    +      write fAutoHintDelayInMSec default 1000;
         property CodeTemplateFileNameRaw: String
           read fCodeTemplateFileNameRaw write fCodeTemplateFileNameRaw;
         property CodeTemplateFileNameExpand:String
    @@ -4916,6 +4919,8 @@
           XMLConfig.GetValue('EditorOptions/CodeTools/AutoToolTipSymbTools', True);
         fAutoDelayInMSec    :=
           XMLConfig.GetValue('EditorOptions/CodeTools/AutoDelayInMSec', 1000);
    +    fAutoHintDelayInMSec    :=
    +      XMLConfig.GetValue('EditorOptions/CodeTools/AutoDelayHintInMSec', 1000);
         fCodeTemplateFileNameRaw :=
           XMLConfig.GetValue('EditorOptions/CodeTools/CodeTemplateFileName'
           , TrimFilename(AppendPathDelim(GetPrimaryConfigPath) + DefaultCodeTemplatesFilename));
    @@ -5114,6 +5119,8 @@
           , fAutoToolTipSymbTools, True);
         XMLConfig.SetDeleteValue('EditorOptions/CodeTools/AutoDelayInMSec'
           , fAutoDelayInMSec, 1000);
    +    XMLConfig.SetDeleteValue('EditorOptions/CodeTools/AutoDelayHintInMSec'
    +      , fAutoHintDelayInMSec, 1000);
         XMLConfig.SetDeleteValue('EditorOptions/CodeTools/CodeTemplateFileName'
           , fCodeTemplateFileNameRaw, '');
         XMLConfig.SetDeleteValue(
    Index: frames/editor_codetools_options.lfm
    ===================================================================
    --- frames/editor_codetools_options.lfm	(wersja 60403)
    +++ frames/editor_codetools_options.lfm	(kopia robocza)
    @@ -13,10 +13,10 @@
       DesignLeft = 263
       DesignTop = 222
       object AutoDelayLabel: TLabel
    -    AnchorSideLeft.Control = AutoHintAndCompletionDelayLabel
    +    AnchorSideLeft.Control = AutoCompletionDelayLabel
         AnchorSideLeft.Side = asrBottom
    -    AnchorSideTop.Control = AutoHintAndCompletionDelayLabel
    -    Left = 217
    +    AnchorSideTop.Control = AutoCompletionDelayLabel
    +    Left = 172
         Height = 15
         Top = 156
         Width = 83
    @@ -89,9 +89,9 @@
         Caption = 'AutoToolTipExprEvalCheckBox'
         TabOrder = 3
       end
    -  object AutoDelayTrackBar: TTrackBar
    +  object AutoCompletionDelayTrackBar: TTrackBar
         AnchorSideLeft.Control = Owner
    -    AnchorSideTop.Control = AutoHintAndCompletionDelayLabel
    +    AnchorSideTop.Control = AutoCompletionDelayLabel
         AnchorSideTop.Side = asrBottom
         AnchorSideRight.Control = Owner
         AnchorSideRight.Side = asrBottom
    @@ -102,7 +102,7 @@
         Frequency = 250
         Max = 4000
         Min = 10
    -    OnChange = AutoDelayTrackBarChange
    +    OnChange = AutoCompletionDelayTrackBarChange
         Position = 500
         ShowSelRange = False
         Anchors = [akTop, akLeft, akRight]
    @@ -111,7 +111,7 @@
         BorderSpacing.Right = 6
         TabOrder = 4
       end
    -  object AutoHintAndCompletionDelayLabel: TLabel
    +  object AutoCompletionDelayLabel: TLabel
         AnchorSideLeft.Control = ToolTipBevel
         AnchorSideTop.Control = DbgToolTipAutoCastClass
         AnchorSideTop.Side = asrBottom
    @@ -118,10 +118,10 @@
         Left = 6
         Height = 15
         Top = 156
    -    Width = 191
    +    Width = 146
         BorderSpacing.Left = 6
         BorderSpacing.Top = 6
    -    Caption = 'AutoHintAndCompletionDelayLabel'
    +    Caption = 'AutoCompletionDelayLabel'
         ParentColor = False
       end
       object CompletionDropDownHintTrackBar: TTrackBar
    @@ -132,11 +132,11 @@
         AnchorSideRight.Side = asrBottom
         Left = 6
         Height = 30
    -    Top = 224
    +    Top = 276
         Width = 622
         Frequency = 250
         Max = 4000
    -    OnChange = AutoDelayTrackBarChange
    +    OnChange = AutoCompletionDelayTrackBarChange
         Position = 0
         ShowSelRange = False
         Anchors = [akTop, akLeft, akRight]
    @@ -143,15 +143,15 @@
         BorderSpacing.Left = 6
         BorderSpacing.Top = 1
         BorderSpacing.Right = 6
    -    TabOrder = 5
    +    TabOrder = 6
       end
       object CompletionDropDownLabel: TLabel
         AnchorSideLeft.Control = ToolTipBevel
    -    AnchorSideTop.Control = AutoDelayTrackBar
    +    AnchorSideTop.Control = AutoHintDelayTrackBar
         AnchorSideTop.Side = asrBottom
         Left = 6
         Height = 15
    -    Top = 208
    +    Top = 260
         Width = 148
         BorderSpacing.Left = 6
         BorderSpacing.Top = 6
    @@ -164,7 +164,7 @@
         AnchorSideTop.Control = CompletionDropDownLabel
         Left = 174
         Height = 15
    -    Top = 208
    +    Top = 260
         Width = 177
         BorderSpacing.Left = 20
         Caption = 'CompletionDropDownDelayLabel'
    @@ -178,13 +178,13 @@
         AnchorSideBottom.Side = asrBottom
         Left = 6
         Height = 23
    -    Top = 256
    +    Top = 308
         Width = 220
         BorderSpacing.Left = 6
         BorderSpacing.Top = 2
         ItemHeight = 15
         Style = csDropDownList
    -    TabOrder = 6
    +    TabOrder = 7
       end
       object CompletionDropDownHintLabel: TLabel
         AnchorSideLeft.Control = CompletionDropDownHint
    @@ -193,7 +193,7 @@
         AnchorSideTop.Side = asrCenter
         Left = 232
         Height = 15
    -    Top = 260
    +    Top = 312
         Width = 171
         BorderSpacing.Around = 6
         Caption = 'CompletionDropDownHintLabel'
    @@ -209,7 +209,7 @@
         Width = 159
         BorderSpacing.Left = 20
         Caption = 'DbgToolTipAutoCastClass'
    -    TabOrder = 7
    +    TabOrder = 8
       end
       object AutoDisplayFuncProtoCheckBox: TCheckBox
         AnchorSideLeft.Control = Owner
    @@ -221,6 +221,53 @@
         BorderSpacing.Left = 6
         BorderSpacing.Top = 6
         Caption = 'AutoDisplayFuncProtoCheckBox'
    -    TabOrder = 8
    +    TabOrder = 9
       end
    +  object AutoHintDelayLabel: TLabel
    +    AnchorSideLeft.Control = ToolTipBevel
    +    AnchorSideTop.Control = AutoCompletionDelayTrackBar
    +    AnchorSideTop.Side = asrBottom
    +    Left = 6
    +    Height = 15
    +    Top = 208
    +    Width = 106
    +    BorderSpacing.Left = 6
    +    BorderSpacing.Top = 6
    +    Caption = 'AutoHintDelayLabel'
    +    ParentColor = False
    +  end
    +  object AutoHintDelayTrackBar: TTrackBar
    +    AnchorSideLeft.Control = Owner
    +    AnchorSideTop.Control = AutoHintDelayLabel
    +    AnchorSideTop.Side = asrBottom
    +    AnchorSideRight.Control = Owner
    +    AnchorSideRight.Side = asrBottom
    +    Left = 6
    +    Height = 30
    +    Top = 224
    +    Width = 622
    +    Frequency = 250
    +    Max = 4000
    +    Min = 10
    +    OnChange = AutoCompletionDelayTrackBarChange
    +    Position = 500
    +    ShowSelRange = False
    +    Anchors = [akTop, akLeft, akRight]
    +    BorderSpacing.Left = 6
    +    BorderSpacing.Top = 1
    +    BorderSpacing.Right = 6
    +    TabOrder = 5
    +  end
    +  object AutoHDelayLabel: TLabel
    +    AnchorSideLeft.Control = AutoHintDelayLabel
    +    AnchorSideLeft.Side = asrBottom
    +    AnchorSideTop.Control = AutoHintDelayLabel
    +    Left = 132
    +    Height = 15
    +    Top = 208
    +    Width = 92
    +    BorderSpacing.Left = 20
    +    Caption = 'AutoHDelayLabel'
    +    ParentColor = False
    +  end
     end
    Index: frames/editor_codetools_options.pas
    ===================================================================
    --- frames/editor_codetools_options.pas	(wersja 60403)
    +++ frames/editor_codetools_options.pas	(kopia robocza)
    @@ -41,20 +41,23 @@
       TEditorCodetoolsOptionsFrame = class(TAbstractIDEOptionsEditor)
         AutoCompleteBlockCheckBox: TCheckBox;
         AutoDelayLabel: TLabel;
    +    AutoHDelayLabel: TLabel;
    +    AutoHintDelayTrackBar: TTrackBar;
         AutoDisplayFuncProtoCheckBox: TCheckBox;
    +    AutoHintDelayLabel: TLabel;
         DbgToolTipAutoCastClass: TCheckBox;
         CompletionDropDownHintLabel: TLabel;
         CompletionDropDownHint: TComboBox;
         CompletionDropDownDelayLabel: TLabel;
    -    AutoDelayTrackBar: TTrackBar;
    +    AutoCompletionDelayTrackBar: TTrackBar;
         CompletionDropDownLabel: TLabel;
         CompletionDropDownHintTrackBar: TTrackBar;
         AutoToolTipExprEvalCheckBox: TCheckBox;
    -    AutoHintAndCompletionDelayLabel: TLabel;
    +    AutoCompletionDelayLabel: TLabel;
         ToolTipBevel: TBevel;
         AutoToolTipSymbToolsCheckBox: TCheckBox;
         AutoRemoveEmptyMethodsOnSave: TCheckBox;
    -    procedure AutoDelayTrackBarChange(Sender: TObject);
    +    procedure AutoCompletionDelayTrackBarChange(Sender: TObject);
       public
         function GetTitle: String; override;
         procedure Setup({%H-}ADialog: TAbstractOptionsEditorDialog); override;
    @@ -69,10 +72,12 @@
     
     { TEditorCodetoolsOptionsFrame }
     
    -procedure TEditorCodetoolsOptionsFrame.AutoDelayTrackBarChange(Sender: TObject);
    +procedure TEditorCodetoolsOptionsFrame.AutoCompletionDelayTrackBarChange(Sender: TObject);
     begin
       AutoDelayLabel.Caption :=
    -    Format(dlgEdDelayInSec, [FormatFloat('0.00', AutoDelayTrackBar.Position/1000)]);
    +    Format(dlgEdDelayInSec, [FormatFloat('0.00', AutoCompletionDelayTrackBar.Position/1000)]);
    +  AutoHDelayLabel.Caption :=
    +    Format(dlgEdDelayInSec, [FormatFloat('0.00', AutoHintDelayTrackBar.Position/1000)]);
       CompletionDropDownDelayLabel.Caption :=
         Format(dlgEdDelayInSec, [FormatFloat('0.00', CompletionDropDownHintTrackBar.Position/1000)]);
     end;
    @@ -91,7 +96,8 @@
       AutoCompleteBlockCheckBox.Caption := dlgEdCompleteBlocks;
       AutoDisplayFuncProtoCheckBox.Caption := dlgAutoDisplayFuncProto;
     
    -  AutoHintAndCompletionDelayLabel.Caption:=lisDelayForHintsAndCompletionBox;
    +  AutoCompletionDelayLabel.Caption:=lisDelayForCompletionBox;
    +  AutoHintDelayLabel.Caption:=lisDelayForHints;
       CompletionDropDownLabel.Caption := lisDelayForCompletionLongLineHint;
       CompletionDropDownHintLabel.Caption := lisCompletionLongLineHintType;
       CompletionDropDownHint.Clear;
    @@ -109,7 +115,8 @@
         AutoToolTipExprEvalCheckBox.Checked := AutoToolTipExprEval;
         AutoToolTipSymbToolsCheckBox.Checked := AutoToolTipSymbTools;
         DbgToolTipAutoCastClass.Checked := DbgHintAutoTypeCastClass;
    -    AutoDelayTrackBar.Position := AutoDelayInMSec;
    +    AutoCompletionDelayTrackBar.Position := AutoDelayInMSec;
    +    AutoHintDelayTrackBar.Position := AutoHintDelayInMSec;
         AutoRemoveEmptyMethodsOnSave.Checked := AutoRemoveEmptyMethods;
         AutoDisplayFuncProtoCheckBox.Checked := AutoDisplayFunctionPrototypes;
     
    @@ -117,7 +124,7 @@
         CompletionDropDownHint.ItemIndex := ord(CompletionLongLineHintType);
     
       end;
    -  AutoDelayTrackBarChange(nil);
    +  AutoCompletionDelayTrackBarChange(nil);
     end;
     
     procedure TEditorCodetoolsOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
    @@ -128,7 +135,8 @@
         AutoToolTipExprEval := AutoToolTipExprEvalCheckBox.Checked;
         AutoToolTipSymbTools := AutoToolTipSymbToolsCheckBox.Checked;
         DbgHintAutoTypeCastClass := DbgToolTipAutoCastClass.Checked;
    -    AutoDelayInMSec := AutoDelayTrackBar.Position;
    +    AutoDelayInMSec := AutoCompletionDelayTrackBar.Position;
    +    AutoHintDelayInMSec := AutoHintDelayTrackBar.Position;
         AutoRemoveEmptyMethods := AutoRemoveEmptyMethodsOnSave.Checked;
         AutoDisplayFunctionPrototypes := AutoDisplayFuncProtoCheckBox.Checked;
     
    Index: lazarusidestrconsts.pas
    ===================================================================
    --- lazarusidestrconsts.pas	(wersja 60403)
    +++ lazarusidestrconsts.pas	(kopia robocza)
    @@ -1977,7 +1977,8 @@
       dlgAutoDisplayFuncProto = 'Auto Display Function Prototypes';
       lisShowDeclarationHints = 'Show declaration hints';
       dlgEdDelayInSec = '(%s sec delay)';
    -  lisDelayForHintsAndCompletionBox = 'Delay for hints and completion box';
    +  lisDelayForCompletionBox = 'Delay for completion box';
    +  lisDelayForHints = 'Delay for hints';
       lisDelayForCompletionLongLineHint = 'Delay for long line hints in completion box';
       lisCompletionLongLineHintType = 'Show long line hints';
       lisCompletionLongLineHintTypeNone = 'Never';
    Index: sourceeditor.pp
    ===================================================================
    --- sourceeditor.pp	(wersja 60403)
    +++ sourceeditor.pp	(kopia robocza)
    @@ -2174,7 +2174,7 @@
       // HintTimer
       FAutoHintTimer := TIdleTimer.Create(nil);
       with FAutoHintTimer do begin
    -    Interval := EditorOpts.AutoDelayInMSec;
    +    Interval := EditorOpts.AutoHintDelayInMSec;
         Enabled := False;
         AutoEnabled := False;
         OnTimer := @HintTimer;
    @@ -10307,7 +10307,7 @@
         IndentToTokenStart:=EditorOpts.CodeTemplateIndentToTokenStart;
       end;
     
    -  FHints.AutoHintTimer.Interval:=EditorOpts.AutoDelayInMSec;
    +  FHints.AutoHintTimer.Interval:=EditorOpts.AutoHintDelayInMSec;
     
       if FDefaultCompletionForm <> nil then begin
         FDefaultCompletionForm.LongLineHintTime := EditorOpts.CompletionLongLineHintInMSec;
    
    hints-completionbox.patch (12,691 bytes)
  • languages-lazaruside.7z (1,426,291 bytes)

Activities

Paweł Dmitruk

2019-02-11 20:58

reporter  

hints-completionbox.patch (12,691 bytes)
Index: editoroptions.pp
===================================================================
--- editoroptions.pp	(wersja 60403)
+++ editoroptions.pp	(kopia robocza)
@@ -1455,6 +1455,7 @@
     fAutoBlockCompletion: Boolean;
     fAutoCodeParameters: Boolean;
     fAutoDelayInMSec: Integer;
+    fAutoHintDelayInMSec: Integer;
     FAutoRemoveEmptyMethods: Boolean;
     fAutoToolTipExprEval: Boolean;
     fAutoToolTipSymbTools: Boolean;
@@ -1661,6 +1662,8 @@
   public
     property AutoDelayInMSec: Integer read fAutoDelayInMSec
       write fAutoDelayInMSec default 1000;
+    property AutoHintDelayInMSec: Integer read fAutoHintDelayInMSec
+      write fAutoHintDelayInMSec default 1000;
     property CodeTemplateFileNameRaw: String
       read fCodeTemplateFileNameRaw write fCodeTemplateFileNameRaw;
     property CodeTemplateFileNameExpand:String
@@ -4916,6 +4919,8 @@
       XMLConfig.GetValue('EditorOptions/CodeTools/AutoToolTipSymbTools', True);
     fAutoDelayInMSec    :=
       XMLConfig.GetValue('EditorOptions/CodeTools/AutoDelayInMSec', 1000);
+    fAutoHintDelayInMSec    :=
+      XMLConfig.GetValue('EditorOptions/CodeTools/AutoDelayHintInMSec', 1000);
     fCodeTemplateFileNameRaw :=
       XMLConfig.GetValue('EditorOptions/CodeTools/CodeTemplateFileName'
       , TrimFilename(AppendPathDelim(GetPrimaryConfigPath) + DefaultCodeTemplatesFilename));
@@ -5114,6 +5119,8 @@
       , fAutoToolTipSymbTools, True);
     XMLConfig.SetDeleteValue('EditorOptions/CodeTools/AutoDelayInMSec'
       , fAutoDelayInMSec, 1000);
+    XMLConfig.SetDeleteValue('EditorOptions/CodeTools/AutoDelayHintInMSec'
+      , fAutoHintDelayInMSec, 1000);
     XMLConfig.SetDeleteValue('EditorOptions/CodeTools/CodeTemplateFileName'
       , fCodeTemplateFileNameRaw, '');
     XMLConfig.SetDeleteValue(
Index: frames/editor_codetools_options.lfm
===================================================================
--- frames/editor_codetools_options.lfm	(wersja 60403)
+++ frames/editor_codetools_options.lfm	(kopia robocza)
@@ -13,10 +13,10 @@
   DesignLeft = 263
   DesignTop = 222
   object AutoDelayLabel: TLabel
-    AnchorSideLeft.Control = AutoHintAndCompletionDelayLabel
+    AnchorSideLeft.Control = AutoCompletionDelayLabel
     AnchorSideLeft.Side = asrBottom
-    AnchorSideTop.Control = AutoHintAndCompletionDelayLabel
-    Left = 217
+    AnchorSideTop.Control = AutoCompletionDelayLabel
+    Left = 172
     Height = 15
     Top = 156
     Width = 83
@@ -89,9 +89,9 @@
     Caption = 'AutoToolTipExprEvalCheckBox'
     TabOrder = 3
   end
-  object AutoDelayTrackBar: TTrackBar
+  object AutoCompletionDelayTrackBar: TTrackBar
     AnchorSideLeft.Control = Owner
-    AnchorSideTop.Control = AutoHintAndCompletionDelayLabel
+    AnchorSideTop.Control = AutoCompletionDelayLabel
     AnchorSideTop.Side = asrBottom
     AnchorSideRight.Control = Owner
     AnchorSideRight.Side = asrBottom
@@ -102,7 +102,7 @@
     Frequency = 250
     Max = 4000
     Min = 10
-    OnChange = AutoDelayTrackBarChange
+    OnChange = AutoCompletionDelayTrackBarChange
     Position = 500
     ShowSelRange = False
     Anchors = [akTop, akLeft, akRight]
@@ -111,7 +111,7 @@
     BorderSpacing.Right = 6
     TabOrder = 4
   end
-  object AutoHintAndCompletionDelayLabel: TLabel
+  object AutoCompletionDelayLabel: TLabel
     AnchorSideLeft.Control = ToolTipBevel
     AnchorSideTop.Control = DbgToolTipAutoCastClass
     AnchorSideTop.Side = asrBottom
@@ -118,10 +118,10 @@
     Left = 6
     Height = 15
     Top = 156
-    Width = 191
+    Width = 146
     BorderSpacing.Left = 6
     BorderSpacing.Top = 6
-    Caption = 'AutoHintAndCompletionDelayLabel'
+    Caption = 'AutoCompletionDelayLabel'
     ParentColor = False
   end
   object CompletionDropDownHintTrackBar: TTrackBar
@@ -132,11 +132,11 @@
     AnchorSideRight.Side = asrBottom
     Left = 6
     Height = 30
-    Top = 224
+    Top = 276
     Width = 622
     Frequency = 250
     Max = 4000
-    OnChange = AutoDelayTrackBarChange
+    OnChange = AutoCompletionDelayTrackBarChange
     Position = 0
     ShowSelRange = False
     Anchors = [akTop, akLeft, akRight]
@@ -143,15 +143,15 @@
     BorderSpacing.Left = 6
     BorderSpacing.Top = 1
     BorderSpacing.Right = 6
-    TabOrder = 5
+    TabOrder = 6
   end
   object CompletionDropDownLabel: TLabel
     AnchorSideLeft.Control = ToolTipBevel
-    AnchorSideTop.Control = AutoDelayTrackBar
+    AnchorSideTop.Control = AutoHintDelayTrackBar
     AnchorSideTop.Side = asrBottom
     Left = 6
     Height = 15
-    Top = 208
+    Top = 260
     Width = 148
     BorderSpacing.Left = 6
     BorderSpacing.Top = 6
@@ -164,7 +164,7 @@
     AnchorSideTop.Control = CompletionDropDownLabel
     Left = 174
     Height = 15
-    Top = 208
+    Top = 260
     Width = 177
     BorderSpacing.Left = 20
     Caption = 'CompletionDropDownDelayLabel'
@@ -178,13 +178,13 @@
     AnchorSideBottom.Side = asrBottom
     Left = 6
     Height = 23
-    Top = 256
+    Top = 308
     Width = 220
     BorderSpacing.Left = 6
     BorderSpacing.Top = 2
     ItemHeight = 15
     Style = csDropDownList
-    TabOrder = 6
+    TabOrder = 7
   end
   object CompletionDropDownHintLabel: TLabel
     AnchorSideLeft.Control = CompletionDropDownHint
@@ -193,7 +193,7 @@
     AnchorSideTop.Side = asrCenter
     Left = 232
     Height = 15
-    Top = 260
+    Top = 312
     Width = 171
     BorderSpacing.Around = 6
     Caption = 'CompletionDropDownHintLabel'
@@ -209,7 +209,7 @@
     Width = 159
     BorderSpacing.Left = 20
     Caption = 'DbgToolTipAutoCastClass'
-    TabOrder = 7
+    TabOrder = 8
   end
   object AutoDisplayFuncProtoCheckBox: TCheckBox
     AnchorSideLeft.Control = Owner
@@ -221,6 +221,53 @@
     BorderSpacing.Left = 6
     BorderSpacing.Top = 6
     Caption = 'AutoDisplayFuncProtoCheckBox'
-    TabOrder = 8
+    TabOrder = 9
   end
+  object AutoHintDelayLabel: TLabel
+    AnchorSideLeft.Control = ToolTipBevel
+    AnchorSideTop.Control = AutoCompletionDelayTrackBar
+    AnchorSideTop.Side = asrBottom
+    Left = 6
+    Height = 15
+    Top = 208
+    Width = 106
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 6
+    Caption = 'AutoHintDelayLabel'
+    ParentColor = False
+  end
+  object AutoHintDelayTrackBar: TTrackBar
+    AnchorSideLeft.Control = Owner
+    AnchorSideTop.Control = AutoHintDelayLabel
+    AnchorSideTop.Side = asrBottom
+    AnchorSideRight.Control = Owner
+    AnchorSideRight.Side = asrBottom
+    Left = 6
+    Height = 30
+    Top = 224
+    Width = 622
+    Frequency = 250
+    Max = 4000
+    Min = 10
+    OnChange = AutoCompletionDelayTrackBarChange
+    Position = 500
+    ShowSelRange = False
+    Anchors = [akTop, akLeft, akRight]
+    BorderSpacing.Left = 6
+    BorderSpacing.Top = 1
+    BorderSpacing.Right = 6
+    TabOrder = 5
+  end
+  object AutoHDelayLabel: TLabel
+    AnchorSideLeft.Control = AutoHintDelayLabel
+    AnchorSideLeft.Side = asrBottom
+    AnchorSideTop.Control = AutoHintDelayLabel
+    Left = 132
+    Height = 15
+    Top = 208
+    Width = 92
+    BorderSpacing.Left = 20
+    Caption = 'AutoHDelayLabel'
+    ParentColor = False
+  end
 end
Index: frames/editor_codetools_options.pas
===================================================================
--- frames/editor_codetools_options.pas	(wersja 60403)
+++ frames/editor_codetools_options.pas	(kopia robocza)
@@ -41,20 +41,23 @@
   TEditorCodetoolsOptionsFrame = class(TAbstractIDEOptionsEditor)
     AutoCompleteBlockCheckBox: TCheckBox;
     AutoDelayLabel: TLabel;
+    AutoHDelayLabel: TLabel;
+    AutoHintDelayTrackBar: TTrackBar;
     AutoDisplayFuncProtoCheckBox: TCheckBox;
+    AutoHintDelayLabel: TLabel;
     DbgToolTipAutoCastClass: TCheckBox;
     CompletionDropDownHintLabel: TLabel;
     CompletionDropDownHint: TComboBox;
     CompletionDropDownDelayLabel: TLabel;
-    AutoDelayTrackBar: TTrackBar;
+    AutoCompletionDelayTrackBar: TTrackBar;
     CompletionDropDownLabel: TLabel;
     CompletionDropDownHintTrackBar: TTrackBar;
     AutoToolTipExprEvalCheckBox: TCheckBox;
-    AutoHintAndCompletionDelayLabel: TLabel;
+    AutoCompletionDelayLabel: TLabel;
     ToolTipBevel: TBevel;
     AutoToolTipSymbToolsCheckBox: TCheckBox;
     AutoRemoveEmptyMethodsOnSave: TCheckBox;
-    procedure AutoDelayTrackBarChange(Sender: TObject);
+    procedure AutoCompletionDelayTrackBarChange(Sender: TObject);
   public
     function GetTitle: String; override;
     procedure Setup({%H-}ADialog: TAbstractOptionsEditorDialog); override;
@@ -69,10 +72,12 @@
 
 { TEditorCodetoolsOptionsFrame }
 
-procedure TEditorCodetoolsOptionsFrame.AutoDelayTrackBarChange(Sender: TObject);
+procedure TEditorCodetoolsOptionsFrame.AutoCompletionDelayTrackBarChange(Sender: TObject);
 begin
   AutoDelayLabel.Caption :=
-    Format(dlgEdDelayInSec, [FormatFloat('0.00', AutoDelayTrackBar.Position/1000)]);
+    Format(dlgEdDelayInSec, [FormatFloat('0.00', AutoCompletionDelayTrackBar.Position/1000)]);
+  AutoHDelayLabel.Caption :=
+    Format(dlgEdDelayInSec, [FormatFloat('0.00', AutoHintDelayTrackBar.Position/1000)]);
   CompletionDropDownDelayLabel.Caption :=
     Format(dlgEdDelayInSec, [FormatFloat('0.00', CompletionDropDownHintTrackBar.Position/1000)]);
 end;
@@ -91,7 +96,8 @@
   AutoCompleteBlockCheckBox.Caption := dlgEdCompleteBlocks;
   AutoDisplayFuncProtoCheckBox.Caption := dlgAutoDisplayFuncProto;
 
-  AutoHintAndCompletionDelayLabel.Caption:=lisDelayForHintsAndCompletionBox;
+  AutoCompletionDelayLabel.Caption:=lisDelayForCompletionBox;
+  AutoHintDelayLabel.Caption:=lisDelayForHints;
   CompletionDropDownLabel.Caption := lisDelayForCompletionLongLineHint;
   CompletionDropDownHintLabel.Caption := lisCompletionLongLineHintType;
   CompletionDropDownHint.Clear;
@@ -109,7 +115,8 @@
     AutoToolTipExprEvalCheckBox.Checked := AutoToolTipExprEval;
     AutoToolTipSymbToolsCheckBox.Checked := AutoToolTipSymbTools;
     DbgToolTipAutoCastClass.Checked := DbgHintAutoTypeCastClass;
-    AutoDelayTrackBar.Position := AutoDelayInMSec;
+    AutoCompletionDelayTrackBar.Position := AutoDelayInMSec;
+    AutoHintDelayTrackBar.Position := AutoHintDelayInMSec;
     AutoRemoveEmptyMethodsOnSave.Checked := AutoRemoveEmptyMethods;
     AutoDisplayFuncProtoCheckBox.Checked := AutoDisplayFunctionPrototypes;
 
@@ -117,7 +124,7 @@
     CompletionDropDownHint.ItemIndex := ord(CompletionLongLineHintType);
 
   end;
-  AutoDelayTrackBarChange(nil);
+  AutoCompletionDelayTrackBarChange(nil);
 end;
 
 procedure TEditorCodetoolsOptionsFrame.WriteSettings(AOptions: TAbstractIDEOptions);
@@ -128,7 +135,8 @@
     AutoToolTipExprEval := AutoToolTipExprEvalCheckBox.Checked;
     AutoToolTipSymbTools := AutoToolTipSymbToolsCheckBox.Checked;
     DbgHintAutoTypeCastClass := DbgToolTipAutoCastClass.Checked;
-    AutoDelayInMSec := AutoDelayTrackBar.Position;
+    AutoDelayInMSec := AutoCompletionDelayTrackBar.Position;
+    AutoHintDelayInMSec := AutoHintDelayTrackBar.Position;
     AutoRemoveEmptyMethods := AutoRemoveEmptyMethodsOnSave.Checked;
     AutoDisplayFunctionPrototypes := AutoDisplayFuncProtoCheckBox.Checked;
 
Index: lazarusidestrconsts.pas
===================================================================
--- lazarusidestrconsts.pas	(wersja 60403)
+++ lazarusidestrconsts.pas	(kopia robocza)
@@ -1977,7 +1977,8 @@
   dlgAutoDisplayFuncProto = 'Auto Display Function Prototypes';
   lisShowDeclarationHints = 'Show declaration hints';
   dlgEdDelayInSec = '(%s sec delay)';
-  lisDelayForHintsAndCompletionBox = 'Delay for hints and completion box';
+  lisDelayForCompletionBox = 'Delay for completion box';
+  lisDelayForHints = 'Delay for hints';
   lisDelayForCompletionLongLineHint = 'Delay for long line hints in completion box';
   lisCompletionLongLineHintType = 'Show long line hints';
   lisCompletionLongLineHintTypeNone = 'Never';
Index: sourceeditor.pp
===================================================================
--- sourceeditor.pp	(wersja 60403)
+++ sourceeditor.pp	(kopia robocza)
@@ -2174,7 +2174,7 @@
   // HintTimer
   FAutoHintTimer := TIdleTimer.Create(nil);
   with FAutoHintTimer do begin
-    Interval := EditorOpts.AutoDelayInMSec;
+    Interval := EditorOpts.AutoHintDelayInMSec;
     Enabled := False;
     AutoEnabled := False;
     OnTimer := @HintTimer;
@@ -10307,7 +10307,7 @@
     IndentToTokenStart:=EditorOpts.CodeTemplateIndentToTokenStart;
   end;
 
-  FHints.AutoHintTimer.Interval:=EditorOpts.AutoDelayInMSec;
+  FHints.AutoHintTimer.Interval:=EditorOpts.AutoHintDelayInMSec;
 
   if FDefaultCompletionForm <> nil then begin
     FDefaultCompletionForm.LongLineHintTime := EditorOpts.CompletionLongLineHintInMSec;
hints-completionbox.patch (12,691 bytes)

Paweł Dmitruk

2019-02-11 20:59

reporter  

languages-lazaruside.7z (1,426,291 bytes)

Paweł Dmitruk

2019-02-11 21:01

reporter   ~0114043

Last edited: 2019-02-11 21:08

View 2 revisions

PATCH: separate delay for hints and completion box
lazarus 2.1 r60403

Juha Manninen

2019-03-15 23:17

developer   ~0114845

Applied, thanks.

Issue History

Date Modified Username Field Change
2016-01-23 00:53 BBaz New Issue
2017-12-09 18:16 Juha Manninen Assigned To => Juha Manninen
2017-12-09 18:16 Juha Manninen Status new => assigned
2018-09-14 19:04 Juha Manninen LazTarget => -
2018-09-14 19:04 Juha Manninen Assigned To Juha Manninen =>
2018-09-14 19:04 Juha Manninen Status assigned => new
2019-02-11 20:58 Paweł Dmitruk File Added: hints-completionbox.patch
2019-02-11 20:59 Paweł Dmitruk File Added: languages-lazaruside.7z
2019-02-11 21:01 Paweł Dmitruk Note Added: 0114043
2019-02-11 21:08 Paweł Dmitruk Note Edited: 0114043 View Revisions
2019-03-15 21:09 Juha Manninen Assigned To => Juha Manninen
2019-03-15 21:09 Juha Manninen Status new => assigned
2019-03-15 23:17 Juha Manninen Fixed in Revision => r60691
2019-03-15 23:17 Juha Manninen Note Added: 0114845
2019-03-15 23:17 Juha Manninen Status assigned => resolved
2019-03-15 23:17 Juha Manninen Resolution open => fixed