diff --git a/qcodeedit/lib/qeditor.cpp b/qcodeedit/lib/qeditor.cpp index b9a067f..3c9a72c 100644 --- a/qcodeedit/lib/qeditor.cpp +++ b/qcodeedit/lib/qeditor.cpp @@ -3153,7 +3153,7 @@ void QEditor::inputMethodEvent(QInputMethodEvent* e) return; } */ -#ifdef Q_WS_MAC +// #ifdef Q_WS_MAC QString preEdit=e->preeditString(); if( !preEdit.isEmpty()){ int i=-1; @@ -3170,7 +3170,7 @@ void QEditor::inputMethodEvent(QInputMethodEvent* e) preEditLength=preEdit.length(); preEditLineNumber=m_cursor.lineNumber(); } -#endif +// #endif if ( e->commitString().count() ) { m_cursor.beginEditBlock(); @@ -3192,10 +3192,20 @@ void QEditor::inputMethodEvent(QInputMethodEvent* e) m_cursor.endEditBlock(); } + + if( preEdit.isEmpty() && e->commitString().isEmpty() && preEditSet) { + m_cursor.beginEditBlock(); + m_cursor.movePosition(preEditLength, QDocumentCursor::Left, QDocumentCursor::KeepAnchor); + m_cursor.removeSelectedText(); + m_cursor.endEditBlock(); + preEditSet = false; + preEditLength = 0; + } foreach ( QEditorInputBindingInterface *b, m_bindings ) b->postInputMethodEvent(e, this); + e->accept(); } /*!
http://texstudio.sourceforge.net/こっからソースをDLしてきて
cd texstudio2.6.2 patch -p1 mypatch.patch
でパッチを適用して
https://sourceforge.net/apps/mediawiki/texstudio/index.php?title=CompileTXS
の手順でコンパイル