impl state accounting in editor to
fix double display of input char