MantisBT - mSLDev
View Issue Details
0000152mSLDevAutoCompletepublic2013-05-01 14:082013-09-16 17:24
Wims 
administrator 
normalminoralways
assignedreopened 
 
0.4.1.0 
0000152: calltip is displayed when it shouldn't
i had this line:

var %b1 $gettok($v1,1,32),%b2 $gettok($v1,2,32),%cb |%vb $gettok($6,$ceil($calc(%b / 2)),32)

| is the cursor.
then i pasted this:

$ceil($calc(%b / 2))

resulting in:

var %b1 $gettok($v1,1,32),%b2 $gettok($v1,2,32),%cb $ceil($calc(%b / 2))|%vb $gettok($6,$ceil($calc(%b / 2)),32)

then, i put a comma:

var %b1 $gettok($v1,1,32),%b2 $gettok($v1,2,32),%cb $ceil($calc(%b / 2)),|%vb $gettok($6,$ceil($calc(%b / 2)),32)

there, msldev displayed the calltip of the $ceil function.
No tags attached.
has duplicate 0000167closed administrator calltip display 
Issue History
2013-05-01 14:08WimsNew Issue
2013-06-14 15:23administratorRelationship addedhas duplicate 0000167
2013-06-29 09:03administratorNote Added: 0000124
2013-06-29 09:03administratorStatusnew => closed
2013-06-29 09:03administratorAssigned To => administrator
2013-06-29 09:03administratorResolutionopen => won't fix
2013-06-29 09:03administratorFixed in Version => 0.4.1.0
2013-09-16 17:07WimsNote Added: 0000127
2013-09-16 17:07WimsStatusclosed => feedback
2013-09-16 17:07WimsResolutionwon't fix => reopened
2013-09-16 17:24WimsNote Added: 0000128
2013-09-16 17:24WimsStatusfeedback => assigned

Notes
(0000124)
administrator   
2013-06-29 09:03   
Not a bug, when you paste your text the results are:

$ceil($calc(%b / 2))%vb

%vb IS part of %ceil, albeit an error (which is why mSLDev complains), but it's still part of it - both from mSLDev prospective and from mIRC (Which will consume it AS PART of $ceil).
(0000127)
Wims   
2013-09-16 17:07   
I disagree, that part would be consumed by the parser after $ceil finished executing, or even before, but it's not related to $ceil anymore.

But the point is inside msldev, that behavior is not useful, if you have:

"var %a |test"

if you type literally "$ceil(5)" ( not using the autocompletion of the ')' ) from that cursor pos (the |), you end up with

"var %a $ceil(5)|test"
and you do not want to get the calltip for $ceil here because you closed it already.
Before adding the ')', "test" is part of the first parameter of $ceil ("var %a $ceil(5|test"), after the ')', it's no longer part of it, we are outside the identifier, no point showing the calltip for something we are done with, if msldev considers appended text after the ')' of an identifier part of the identifier that's wrong.
(0000128)
Wims   
2013-09-16 17:24   
More on this, the duplicate thread is just so relevant ( http://www.msldev.com/bugs/view.php?id=167 [^] )

"var %a $hfind(...,...).data|"

| is the cursor

hitting a comma would obviously be the thing to do to add another variable declaration, msldev thinks you are still inside $hfind if you add the comma, it shouldn't, adding any different character would indeed result in you just editing the property of $hfind, but not with a comma.

Note that the two reports are not even related, this one is about msldev wrongly suggesting a calltip, the other is about msldev not recognizing we're making a new variable declaration

for this report, after pasting, we have

var %b1 $gettok($v1,1,32),%b2 $gettok($v1,2,32),%cb $ceil($calc(%b / 2))|%vb $gettok($6,$ceil($calc(%b / 2)),32)

and "%vb $gettok($6,$ceil($calc(%b / 2)),32)" should be highlighted as errors, however it shouldn't consider we are inside $ceil, because it's already closed..