Author Topic: Auto brackets for built in function is not working in cpp  (Read 470 times)

Offline ahs_58

  • Single posting newcomer
  • *
  • Posts: 2
Auto brackets for built in function is not working in cpp
« on: May 31, 2020, 07:35:13 pm »
Auto brackets after built in function in c++ was working fine when I  was using older version of codeblocks. But after installing latest version (20.03) of codeblock I need to press brackets manually.Let me clarify the matter with an example:

say I want to use sort() function for sorting a array:

In older version I just wrote sort and press ENTER key then I got like this

write sort  [Press ENTER key]  sort()

but in new version I need to press opening bracket key after writing sort
example:

write sort   [Press opening first braket key]  [Press ENTER key]   sort()


How to solve this problem? How to get old version feature that I have described above in my new codeblocks?

Thanks In Advance  :)

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12695
    • Travis build status
Re: Auto brackets for built in function is not working in cpp
« Reply #1 on: May 31, 2020, 07:42:08 pm »
There is a setting for this. Are you sure it is still enabled?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline ahs_58

  • Single posting newcomer
  • *
  • Posts: 2
Re: Auto brackets for built in function is not working in cpp
« Reply #2 on: May 31, 2020, 07:45:44 pm »
Can you tell me exactly what that setting is?I don't know about this.

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12695
    • Travis build status
Re: Auto brackets for built in function is not working in cpp
« Reply #3 on: May 31, 2020, 08:21:11 pm »
Something related to braces and completion :)
There are two settings related to this and I'm not sure which one is the one you need.
Inspect the Settings -> Editor.

p.s. I don't use this so I cannot help you more. But we have not removed it.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline huycan

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: Auto brackets for built in function is not working in cpp
« Reply #4 on: June 10, 2020, 12:51:18 am »
Let me reiterate what the OP means to say.

The problem is with the Code completion. There is an option "Add parentheses after function name auto completion" when checked, parentheses are automatically added to the function name. It worked in the past version of CB. But starting with 20.03 and all the nightly builds, it stops working.

For example, if I start typing "std:abs" ... the Code completion will give me a list of choices and after I choose (let say the first one), it will display in the editor "std::abs" (for the 20.03 ver)... but in the past, CB 17 and older... the display will be "std::abs()" ... Notice the parentheses...

Edit: This bug only happens under Windows... Linux working fine...
« Last Edit: June 10, 2020, 01:15:10 am by huycan »

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12695
    • Travis build status
Re: Auto brackets for built in function is not working in cpp
« Reply #5 on: June 10, 2020, 10:51:20 am »
Can you find the night build which broke this?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline huycan

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: Auto brackets for built in function is not working in cpp
« Reply #6 on: June 10, 2020, 01:44:18 pm »
The April 20, 2019 svn11628 still working...
The Nov 18, 2020 svn11954 already broken...

In between, I don't know.. I cannot tested... because the required file "wxmsw31u_gcc_cb_wx311_2D_gcc810-mingw64.7z" is missing in download....

Online oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 12695
    • Travis build status
Re: Auto brackets for built in function is not working in cpp
« Reply #7 on: June 10, 2020, 06:43:13 pm »
@killerbot: Do you know something about this? Can you re-upload the file?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline Miguel Gimenez

  • Regular
  • ***
  • Posts: 458
Re: Auto brackets for built in function is not working in cpp
« Reply #8 on: June 10, 2020, 07:37:30 pm »
The Nov 18, 2020 svn11954 already broken...

Do you mean Nov 18, 2019?
« Last Edit: June 10, 2020, 07:39:05 pm by Miguel Gimenez »

Offline huycan

  • Multiple posting newcomer
  • *
  • Posts: 24
Re: Auto brackets for built in function is not working in cpp
« Reply #9 on: June 10, 2020, 08:49:35 pm »
The Nov 18, 2020 svn11954 already broken...

Do you mean Nov 18, 2019?

Oops...I misread 0118... I mean the January 18, 2020.... is broken... svn11954....