MantisBT - mSLDev
View Issue Details
0000083mSLDevAutoCompletepublic2013-03-23 12:162013-03-24 03:05
Wims 
administrator 
normalminoralways
closedfixed 
Win7 64-bitWindows 7(6.1)
0.3.1.0 
0.4.1.0 
7.29
0000083: %variable autocomplete weird behaviors
See the steps
load this:
alias -l mario_head {
  if (!$10) {
    var %gap,%xw $1 + 13,%yw,%ex $3 + 13,%xw1 $1 + 3,%ex1 $3 + 3,%ey,%xs,%ys,%head
    if ($8 == grand) %gap = 4
    else %gap = 0
    %yw = $2 + %gap
    %ey = $4 + %gap
    if (%xw < %ex) %xs = <
    else %xs = >
    if (%yw < %ey) %ys = <
    else %ys = >
    if ($mario_collision(2,%xw,%yw,%xw1,%yw,%ex,%ey,%ex1,%ey,%xs,%ys,$7) != $null) %head = $v1
  }
  if (%head) && ($7 > 0) {
    if ($11) {
      ;side
      var %xw $gettok(%head,2,32),%yw $gettok(%head,3,32),%gap1,%temp $int($calc(%yw / 8)) * 8,%ye,%xe $calc(%xw - $gettok(%head,1,32) $6),%wall,%r
      if ($8 != grand !$ !=$%v) {
>>>> inc %temp 8
        %gap1 = 25
        $bytes()
      }
      else %gap1 = 9
      %ye = $calc(%temp - %gap + %gap1)
      if (!$getdot(@wall,%xe,%ye)) %wall = 1
        
      else {
        if ($8 == grand) %gap1 = 20
        else %gap1 = 4
        %ye = $calc(%temp - %gap + %gap1)
        if (!$getdot(@wall,%xe,%ye)) %wall = 2
        elseif (!$9) && ($8 == grand) {
          %ye = $calc(%temp - %gap + 11)
          if (!$getdot(@wall,%xe,%ye)) %wall = 3
        }
      }
      if (%wall) {
        var %xw $calc(($int($calc(%xe / 8)) $5) * 8)
        while (!$getdot(@wall,%xw,%ye)) var -s %xw = %xw $left($5,1) 8
        var %yw = %temp
      }
      echo -a >> %xw %yw - %head
      if (!$getdot(@wall,%xw,%yw)) {
        if (!%wall) %xw = %xw - $gettok(%head,1,32)
        %r = 1 %xw $calc(%temp / 8)
        var %xh $int($calc((%xw + 8) / 8)),%yh $calc(%temp / 8) - 2,%xh1 %xh - 1,%xh2 %xh + 1,%xh3 %xh + 2,%xh4 %xh - 2
        var %h $+(%xh,.,%yh) $+(%xh1,.,%yh) $+(%xh2,.,%yh) $+(%xh3,.,%yh) $+(%xh4,.,%yh),%v1,%a 1
        while ($gettok(%h,%a,32)) {
          %v1 = $v1
          if ($hget(templv,%v1)) {
            echo -a head hit %v1
            tokenize 32 $replace(%v1,.,$chr(32)) $hget(templv,%v1)
            if ($3 == bloc14) {
              if ($4) {
                hadd mario_object item $+ $hget(mario_object,0).item $calc($1 * 8) $calc($2 * 8 -1) 1 $3 $iif($4,$v1,droite)
                hadd templv %v1 block14
              }
              drawcopy -nt @mario.b 16711935 $item.mn(bm) 16 16 @lvl $calc($1 * 8) $calc($2 * 8)
            }
            break
          }
          inc %a
        }
        return %r
      }
    }
    elseif (!$12) && ($9) return 2
  }
  else return 3
  return 0
}

Where there are the >>>>, after the '8' type '%', see the list, now press shift, it only proposes %temp.
No tags attached.
Issue History
2013-03-23 12:16WimsNew Issue
2013-03-23 12:24administratorNote Added: 0000035
2013-03-23 13:20WimsNote Added: 0000039
2013-03-24 03:05administratorStatusnew => closed
2013-03-24 03:05administratorAssigned To => administrator
2013-03-24 03:05administratorResolutionopen => fixed
2013-03-24 03:05administratorFixed in Version => 0.4.1.0

Notes
(0000035)
administrator   
2013-03-23 12:24   
I cannot reproduce it. I see the list of variables with or without the shift key.

The only time I only see %temp is when I actually type '%t'
(0000039)
Wims   
2013-03-23 13:20   
I use 0.4.0.15, i can reproduce everytime
Also, the variable completion doesn't work at the beginning of a command
Also, there is a problem with it when you delete characters, it doesn't update correctly

Which version are you using?