Author Topic: problem w/ pad parens and auto-arg completion  (Read 5220 times)

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
problem w/ pad parens and auto-arg completion
« on: August 12, 2006, 01:57:25 AM »
Hello Slickteam,
I think there is a bug releated to 'Tagging' options (file extension setup) and auto (arg-)completion. I know - it's complex ...
(Language == C)
Auto-insert matching parameter == ON
Pad parentheses == ON

Docu: If selected, a space is inserted after the open parenthesis when a parameter name is automatically inserted. In addition, if you type a close parenthesis after an automatically inserted parameter, it will insert a space before the close parenthesis.
-> That's what I want !

Real: No <SPACE> is auto-inserted between the open '(' and the magically appeared matching parameter.
The closing ')' and comma spacing is fine.

My workaround: Set 'Update after idle' to a value large enough to quickly hit <SPACE> (after completion of the related function) _before_ the matching arg is auto-inserted.
Example:
'foo<cursor here>' -> Alt-. -> select fooBar and complete w/ <SPACE> -> result: 'fooBar (<cursor here>'
(Always insert SPACE == ON)
Auto-insertion of the 1st arg (uniq match) leads to: 'fooBar (arg1<cursor here>' w/o pad parens after '('.

---------Modified 12.08.2006---------

Couldn't wait and it's raining anyway...
I think I found it:
codehelp.e [$Revision: 1.124.2.4 $] - still_in_function_help() [line 4328] should be completed with insert_space'ing:
Code: [Select]
if (gFunctionHelp_OperatorTyped && ginFunctionHelp) {
// HS2: added insert_space'ing
boolean insert_space =  !(_ext_codehelp_flags() & VSCODEHELPFLAG_NO_SPACE_AFTER_COMMA) &&
                        !(_ext_codehelp_flags() & VSCODEHELPFLAG_NO_SPACE_AFTER_PAREN);
gFunctionHelp_InsertedParam=maybe_insert_current_param(true, true, insert_space);
}

Seems to be ok ...

Here is another one (lang == e):
function-argument-help (Alt-,) failes on arg-prefixes color-coded as keyword:
Example:
'DoDefaultKey(key,do<cursor here> -> <Alt-,>' -> Slick claims 'not in fct.arg list'
I'm sure this is already known, right ?

HS2
« Last Edit: August 12, 2006, 12:04:04 PM by hs2 »

ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: problem w/ pad parens and auto-arg completion
« Reply #1 on: September 07, 2006, 01:38:06 PM »
Dennis took a look at this and was able to create a hot fix for it. Please contact product support to get it.  Thanks for reporting this problem!

--Scott

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: problem w/ pad parens and auto-arg completion
« Reply #2 on: September 08, 2006, 01:41:30 PM »
Great - thank's a lot !

HS2