Something like this should do the trick, untested let me know if there are problems.

/window -e @testing
Code:
on *:keydown:*:9: {
  tokenize 46 $editbox($active)
  var %last_wrd = $gettok($1-,$numtok($1-,32),32) $+ *
  if (%last_wrd iswm $active) {
    editbox -a $puttok($1-,$active,$numtok($1-,32),32)
  }
}


"Allen is having a small problem and needs help adjusting his attitude" - Flutterby