Forum > Editor

v3.99 code completion question

(1/4) > >>

440bx:
Please refer to the screenshot.

In line 3136, the editor changed "char" to "Char".  I'd like the editor to not change anything I type (even if it's wrong... I'll fix it myself) but, I couldn't find the setting that tells the editor to leave my code alone.

In line 3137, the editor suggests "ArrayStringToPPchar" and no matter what I type next it puts that "ArrayStringToPPchar" string in there.  I'd like the editor to put whatever it is suggesting only if I press "enter" or possibly "tab" and _nothing_ for any other key.  Right now, it puts that string in there no matter what I type.

Thank you for your help.

VisualLab:

--- Quote from: 440bx on April 20, 2024, 12:45:55 am ---Please refer to the screenshot.

In line 3136, the editor changed "char" to "Char".  I'd like the editor to not change anything I type (even if it's wrong... I'll fix it myself) but, I couldn't find the setting that tells the editor to leave my code alone.

In line 3137, the editor suggests "ArrayStringToPPchar" and no matter what I type next it puts that "ArrayStringToPPchar" string in there.  I'd like the editor to put whatever it is suggesting only if I press "enter" or possibly "tab" and _nothing_ for any other key.  Right now, it puts that string in there no matter what I type.

Thank you for your help.

--- End quote ---

I tried to replicate behaviour of Lazarus by entering the code provided in the screenshot. But I didn't notice the behavior you described. I'm using Lazarus 3.0 (64-bit), Windows 10 (64-bit). So it's probably some option that is enabled in your IDE, but disabled in mine.

Unless this applies to a newer version of Lazarus. In any case, this is a disturbing behavior of the IDE, because the editor should be helpful and not "a pompous wise guy who knows better than the programmer".

440bx:

--- Quote from: VisualLab on April 20, 2024, 03:12:27 pm ---I'm using Lazarus 3.0 (64-bit), Windows 10 (64-bit).
<snip>
Unless this applies to a newer version of Lazarus.

--- End quote ---
Yes, that behavior is from v3.99 (Lazarus trunk.) 

I normally use Lazarus v3.2 and in that version I haven't experienced that problem.

What I don't know is if it is caused by a bug or some IDE setting.  I'd like to find that out.

JuhaManninen:

--- Quote from: 440bx on April 20, 2024, 04:30:30 pm ---Yes, that behavior is from v3.99 (Lazarus trunk.) 
I normally use Lazarus v3.2 and in that version I haven't experienced that problem.
What I don't know is if it is caused by a bug or some IDE setting.  I'd like to find that out.

--- End quote ---
In a test app I put

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  abc: Arrayand then press Ctrl-Space to open the completion list. Then I press Space and indeed the first item in the list (ArrayStringToPPchar) is added.

I happen to have a binary of Lazarus 3.0RC2 here. I tested and it behaves exactly the same. I believe Lazarus 3.2 also behaves the same.
Are you sure your v3.99 and v3.2 work differently?

The behavior itself is a borderline between feature / bug. If you don't want any completion, press Esc to close the completion list.

440bx:

--- Quote from: JuhaManninen on April 21, 2024, 09:12:38 am ---Are you sure your v3.99 and v3.2 work differently?

--- End quote ---
Completely different, night and day.

This last version of trunk is the first version of Lazarus I use that wants to change my "array" to something totally unrelated (and that's not the only word that triggers it.)   

It's because the behavior is so different that I thought it was caused by some setting but, after disabling just about everything I could think of, it still insists on inserting text I did nothing to get (except type my code as I normally do.)

Lazarus v3.2 works great. 

Maybe I'll create a brand new trunk installation (instead of updating an existing trunk installation, which is what I did to get this installation.)   I don't care much to do that because, every time I do it, I have to re-establish all the settings I had in the previous installation and, I never remember all the settings I changed and to what values I set them.

Navigation

[0] Message Index

[#] Next page

Go to full version