Fix a possible refresh issue in the text boxes.

When delete_selection deletes text and insert char doesn't insert
anything the widget was not properly updated. The bug was mainly
theoretical in nature.
Avoid spurious notification in the text box.

The editing only happened if one of two conditions was true, the event
was always fired. The issue is minor and might have been mainly
theoretical.
Merge branch 'ttext_fixes' into 1.12

Some minor fixes for the ttext_ class, found while reviewing the code.