Update texteditor.py