Page 1 of 1

Limit the code completion to ENTER key

Posted: Tue Dec 09, 2025 10:49 am
by Ats
Sorry, but the code completion in ZGameEditor is super annoying when you are not paying attention...
Just type the sentence “in a car or a boat”, you get “indexOf abs car ord abs boat”.

My suggestion: only the ENTER key should validate the code completion, not the SPACEBAR :wink:

Re: Limit the code completion to ENTER key

Posted: Tue Dec 09, 2025 11:31 am
by VilleK
I see what you mean but surely you have to press "ctrl + space" to open the code completion? If I just type "in a car or a boat" here I get no completion. So I've never noticed a problem like what you describe.

Re: Limit the code completion to ENTER key

Posted: Tue Dec 09, 2025 11:50 am
by Kjell
Hi guys,

Technically it's not just Ctrl+Space .. the auto-completion dialog also pops up when you stop typing for (approximately) 3 seconds.

Anyway, even though i've never ran into this issue myself either, i do agree that insertion of the selected dialog item should only happen when pressing the Enter key ( or by clicking on a item using the mouse ).

K

Re: Limit the code completion to ENTER key

Posted: Tue Dec 09, 2025 12:21 pm
by Ats
I'm not pressing ctrl+space. The auto-completion always pops up while typing. That's one of the reasons I switched to SublimeText... So for typing my example, I do
in [escape] [space] a [escape] [space] car or [escape] [space] a [escape] [space] boat.
Which is tedious :lol:

I have no special keys pressed. My keyboard is AZERTY if it helps.
the auto-completion dialog also pops up when you stop typing for (approximately) 3 seconds.
I don't have that. But I have an empty auto-completion that I have to close with ESCAPE if no words are found while typing.


Edit:

I tried typing :
in [CTRL+SPACE]
This also validates the first suggestion "indexOf".

I'm running Windows 11.

Here's my ZGameEditor.ini if it helps:

Code: Select all

[Designer]
CodeEditorFontName=Consolas
LastOpenedProject=C:\Omeganaut\Omeganaut.zgeproj
GuiLayout=0
CodeEditorFontSize=10
Scaling=100
LastOpenedPath=C:\Omeganaut\
Width=3456
Height=1408
IsMaximized=1
MruList=C:\Omeganaut\Omeganaut.zgeproj
LowerRightPanel.Height=801
LogPanel.Width=203
LeftPanel.Width=276
PackerProg={$toolpath}upx.exe
PackerParams={$exename}
CodeCompletionDelay=100
Style=Windows
AndroidSdkPath=C:\Android\android-sdk-windows
AndroidSdCardPath=/sdcard/
AndroidAntPath=C:\Android\apache-ant-1.10.15
AndroidKeystorePath=C:/Android/license/android.keystore
AndroidKeystoreAlias=TxoriUP
UseThreadedProcessing=1
CodeEditorFontName=
HelpComponentURL=https://www.zgameeditor.org/index.php/ComponentRef/
RemoveUnusedComponents=1
The struggle:
ezgif.com-optimize (1).gif
ezgif.com-optimize (1).gif (149.87 KiB) Viewed 10284 times
I don't mind having the code completion always poping up. But SPACE should not validate the suggestion :lol:

Re: Limit the code completion to ENTER key

Posted: Tue Dec 09, 2025 1:52 pm
by VilleK
Aha I see this in your ini-file

CodeCompletionDelay=100

Try increasing that value :)

Re: Limit the code completion to ENTER key

Posted: Tue Dec 09, 2025 3:03 pm
by Ats
I just tried 10000 (10 seconds !), it doesn't change a thing. Suggestion opens instantly and validates the first thing it finds with the spacebar.

Edit :
I needed to reboot ZGE for the new number to be taken into account :D
But still, I have no problems with the suggestions opening instantly if they are validated with ENTER. How do they do it in big IDE such as Visual Studio?

Re: Limit the code completion to ENTER key

Posted: Tue Dec 09, 2025 6:08 pm
by Kjell
Hi Ats,
Ats wrote: Tue Dec 09, 2025 3:03 pmHow do they do it in big IDE such as Visual Studio?
In Visual Studio the IntelliSense dialog pops up as soon as you start typing ( if there's anything to suggest ). When there are still multiple possible suggestions, pressing the spacebar will close the IntelliSense dialog and add a space to the document. But when there's only one possible suggestion left, spacebar will actually insert the suggestion instead.

K