Author Topic: Expansion for parameters  (Read 960 times)

b

  • Senior Community Member
  • Posts: 308
  • Hero Points: 26
Expansion for parameters
« on: September 12, 2018, 10:52:51 pm »
Not sure if this is a bug or likely just a misconfiguration on my end.

I don't recall seeing this in earlier betas (presently using b4), but it has been getting terribly annoying.

As example, I have defined and declared the following:
void
BootVerCmd(const char *__restrict __attribute__((unused)) params,
           size_t __attribute__((unused)) maxlen)

But when I go to type in the function, it appears to hit or miss on when it decides its going to go ahead and put the parameter in, or not.  So many times, I have to delete what it put in and then type what I want.

E.g.,

BootCmd(param|   <-- fills it in before I can type what I want where I will have to delete it and then put in what I want.

This is just this example.  But some functions it behaves as I would expect (shows me to the definition via popup and waits to let me type in the parameter, other times it shows me the definition via pop up and already fills it in whether I want it or not.

All prototypes do have helpful variable names for the parameters.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 5146
  • Hero Points: 425
Re: Expansion for parameters
« Reply #1 on: September 13, 2018, 12:00:50 am »
Can you post a stand alone sample source file where we can reproduce this? There really isn’t enough here for us to go on.

If a symbol matches the name used in a prototype, then it is inserted. It’s supposed to be inserted and selected. That way, typing will replace the selected text.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2920
  • Hero Points: 438
Re: Expansion for parameters
« Reply #2 on: September 13, 2018, 02:18:31 pm »
I was able to reproduce this pretty easily.  When SlickEdit auto-inserts the parameter, it is supposed to leave it selected so that you can type over the auto-inserted symbol if that isn't what you wanted.  Something is causing the selection to go away.  I'll look into it.

As a workaround, you might want to turn off the option:  Document > C/C++ Options... > Context Tagging(R) > Auto-insert matching parameter.

Dennis

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2920
  • Hero Points: 438
Re: Expansion for parameters
« Reply #3 on: September 13, 2018, 04:11:10 pm »
This will be fixed in the next beta drop.

b

  • Senior Community Member
  • Posts: 308
  • Hero Points: 26
Re: Expansion for parameters
« Reply #4 on: September 13, 2018, 06:11:07 pm »
Thanks!