cstate.py : fixed a bug relating to the editor where the resulting text should be written