fakevim: implement paren matching w/o making FakeVimHandler depend on Qt Creator's TextEditor

This commit is contained in:
Martin Aumueller
2009-01-28 22:03:51 +01:00
parent 1dc1a64e19
commit 23a9971ad2
3 changed files with 50 additions and 0 deletions

View File

@@ -1846,6 +1846,16 @@ void FakeVimHandler::Private::moveToNextWord(bool simple)
void FakeVimHandler::Private::moveToMatchingParanthesis()
{
bool moved = false;
bool forward = false;
emit q->moveToMatchingParenthesis(&moved, &forward, &m_tc);
if (moved && forward) {
if (m_submode == NoSubMode || m_submode == ZSubMode || m_submode == RegisterSubMode)
m_tc.movePosition(Left, KeepAnchor, 1);
}
#if 0
// FIXME: remove TextEditor dependency
bool undoFakeEOL = false;