Delphi wrote: |
1) I am typing first letters of function name (str_)
2) I am pressing ctrl+space to see the function list
3) I am choosing appropriate one (in case if it is not first one in the list) and I am hitting enter key
4) I am starting adding function parameters (cursor is already moved to correct place)
So up to this point I can not see any problem, may be I have to do something else or ... |
Hehe okay. Let me try to explain it.
First, imagine not using the code completion but simply typing the function name with ACB enabled:
substr(|) (the bracket in bold is automatically added by the editor and | is where the cursor is).
Now you type the arguments, as normal
substr("test",1, 2|) (again, same thing with bold and cursor)
Now comes the part what this discussion is all about: You type the closing bracket yourself:
substr("test",1, 2)|
In most editors the behavior is to "remember" that it added the closing bracket, and if you type one yourself, you'll overwrite the editor-added one (or it will be skipped as is asked here in the poll, same result), which yields the correct string.
What PHPed does right now, is add a second bracket, like so:
substr("test",1, 2)|)
So the discussion is if this should be changed to match the default behavior in the other editors out there.
The code completion already adds both opening and closing bracket, but imo if the functionality described above is implemented for the ACB option, it should work the same for snippets of code inserted by the code completion.
Hope that makes everything clear.