Page 1 of 1
[Done] No Autocomplete Popup
Posted: Wed Mar 13, 2024 12:51 am
by novablue
On PB 6.10 Beta 7
When i write "MyModule::" normally the autocomplete list would pop up right away but it only does now when i type the first letter. The same happens with structured objects and others.
Code: Select all
DeclareModule MyModule
Declare.i Test()
EndDeclareModule
Module MyModule
Procedure.i Test()
EndProcedure
EndModule
MyModule::
Re: No Autocomplete Popup
Posted: Mon Mar 18, 2024 8:36 am
by fryquez
AutoComplete.pb --> AutoComplete_AddFromSorted()
For empty Prefix$, RadixEnumerateAll needs to be called.
Code: Select all
Procedure AutoComplete_AddFromSorted(*Parser.ParserData, Prefix$, *Ignore.SourceItem, SingleModuleOnly)
If *Parser\SortedValid
For Type = 0 To #ITEM_LastSorted
If AutocompleteOptions(Type) And Type <> #ITEM_Constant ; constants are separate
If Type = #ITEM_DeclareModule
; module names are indexed in the main module
; do not show modules if a prefix:: is provided before the word
If SingleModuleOnly = 0
RadixEnumeratePrefix(*Parser\MainModule\Indexed[Type], Prefix$, *AutoCompleteItems())
ForEach *AutoCompleteItems()
If *AutoCompleteItems() <> *Ignore
AutoComplete_AddItem(*AutoCompleteItems())
EndIf
Next *AutoCompleteItems()
EndIf
Else
; other stuff
ForEach AutoCompleteModules()
If Prefix$ <> ""
RadixEnumeratePrefix(*Parser\Modules(UCase(AutoCompleteModules()))\Indexed[Type], Prefix$, *AutoCompleteItems())
Else
RadixEnumerateAll(*Parser\Modules(UCase(AutoCompleteModules()))\Indexed[Type], *AutoCompleteItems())
EndIf
ForEach *AutoCompleteItems()
If *AutoCompleteItems() <> *Ignore
AutoComplete_AddItem(*AutoCompleteItems())
EndIf
Next *AutoCompleteItems()
Next AutoCompleteModules()
EndIf
EndIf
Next Type
EndIf
EndProcedure
Re: [Done] No Autocomplete Popup
Posted: Fri Mar 22, 2024 9:06 am
by Fred
Fixed, thanks for the fix !