Author Topic: Expansion for parameters  (Read 2338 times)

b

  • Senior Community Member
  • Posts: 325
  • 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: 6934
  • Hero Points: 531
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

  • Senior Community Member
  • Posts: 3989
  • Hero Points: 519
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

  • Senior Community Member
  • Posts: 3989
  • Hero Points: 519
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: 325
  • Hero Points: 26
Re: Expansion for parameters
« Reply #4 on: September 13, 2018, 06:11:07 PM »
Thanks!