- wxGtkTextInsert(m_text, m_defaultStyle, txt, txtlen);
- }
- else // no style
- {
- gint len = GTK_EDITABLE(m_text)->current_pos;
- gtk_editable_insert_text( GTK_EDITABLE(m_text), txt, txtlen, &len );
- }
+ // always use m_defaultStyle, even if it is empty as otherwise
+ // resetting the style and appending some more text wouldn't work: if
+ // we don't specify the style explicitly, the old style would be used
+ wxGtkTextInsert(m_text, m_defaultStyle, txt, txtlen);