Skip to content

Commit

Permalink
Add autocompletion support for all Pascal Scripting event function pa…
Browse files Browse the repository at this point in the history
…rameters. Always shows all parameters instead of just those of the current event function.
  • Loading branch information
martijnlaan committed Oct 10, 2024
1 parent 4998323 commit 96d1b58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
10 changes: 10 additions & 0 deletions Projects/Src/IDE.ScintStylerInnoSetup.pas
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,14 @@ TISPPDirective = record
'function UninstallNeedRestart: Boolean;'
];

EventFunctionsParameters: array of AnsiString = [
'CurStep', 'CurProgress', 'MaxProgress', 'CurPageID', 'Cancel', 'Confirm',
'PageID', 'Password', 'Space', 'NewLine', 'MemoUserInfoInfo',
'MemoDirInfo', 'MemoTypeInfo', 'MemoComponentsInfo', 'MemoGroupInfo',
'MemoTasksInfo', 'PreviousDataKey', 'Serial', 'NeedsRestart',
'CurUninstallStep'
];

inSquiggly = 0;
inPendingSquiggly = 1;

Expand Down Expand Up @@ -629,6 +637,8 @@ constructor TInnoSetupStyler.Create(AOwner: TComponent);
end;
for var S in PascalVariables do
AddWordToList(SL, S, awtScriptVariable);
for var S in EventFunctionsParameters do
AddWordToList(SL, S, awtScriptVariable);
FScriptWordList[False] := BuildWordList(SL);

{ Add stuff from Isxclasses }
Expand Down
3 changes: 2 additions & 1 deletion whatsnew.htm
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
<li>Only if Visual Studio Code-style editor shortcuts have been activated: Added shortcuts to copy line down (Shift+Alt+Down) and to indent or unindent lines (Ctrl+] and Ctrl+[).</li>
<li>Added parameter hints for all Pascal Scripting support functions for quick reference to the function's parameter names, types, and order. Parameter hints can be invoked manually by pressing Ctrl+Shift+Space or automatically by using the new <i>Invoke parameter hints automatically</i> option which is enabled by default.</li>
<li>Added autocompletion support for all Pascal Scripting support functions, types, constants, etcetera. Existing option <i>Invoke autocompletion automatically</i> controls whether the autocompletion suggestions appear automatically or only when invoked manually by pressing Ctrl+Space or Ctrl+I.</li>
<li>Added parameter hints and autocompletion support for all Pascal Scripting support class members and properties. Both always show all classes' members and properties instead of just those of the object's class.</li>
<li>Added parameter hints and autocompletion support for all Pascal Scripting support class members and properties. Both always show all classes' members and properties instead of just those of the current object's class.</li>
<li>Added autocompletion support for all Pascal Scripting event function parameters. Always shows all parameters instead of just those of the current event function.</li>
<li>Added new <i>Enable section folding</i> option which allows you to temporarily hide sections while editing by clicking the new minus or plus icons in the editor's gutter or by using the new keyboard shortcuts (Ctrl+Shift+[ to fold and Ctrl+Shift+] to unfold) or menu items. Enabled by default.</li>
<li>The editor's gutter now shows change history to keep track of saved and unsaved modifications. Always enabled.</li>
<li>The editor's font now defaults to Consolas if available, consistent with most other modern editors.</li>
Expand Down

0 comments on commit 96d1b58

Please sign in to comment.