--- kate/view/kateviewinternal.cpp.orig 2010-03-21 20:57:09.000000000 +0900 +++ kate/view/kateviewinternal.cpp 2010-03-21 21:23:25.000000000 +0900 @@ -3778,13 +3778,6 @@ return; } - // if the input method event is text that should be inserted, call KateDocument::typeChars() with - // the text. that method will handle the input and take care of overwrite mode, etc. - if ( e->commitString().length() > 0 && doc()->typeChars( m_view, e->commitString() ) ) { - e->accept(); - return; - } - //kDebug( 13030 ) << "Event: cursor" << m_cursor << "commit" << e->commitString() << "preedit" << e->preeditString() << "replacement start" << e->replacementStart() << "length" << e->replacementLength(); if ( m_view->selection() ) @@ -3812,7 +3805,9 @@ if (start != removeEnd) doc()->removeText(KTextEditor::Range(start, removeEnd)); if (!e->commitString().isEmpty()) - doc()->insertText(start, e->commitString()); + // if the input method event is text that should be inserted, call KateDocument::typeChars() + // with the text. that method will handle the input and take care of overwrite mode, etc. + doc()->typeChars(m_view, e->commitString()); doc()->editEnd(); // Revert to the same range as above @@ -3838,6 +3833,7 @@ renderer()->setDrawCaret(false); renderer()->setCaretOverrideColor(QColor()); + e->accept(); return; }