Commit 54eac56c authored by hjk's avatar hjk

fakevim: support snippets, by doing nothing.

Reviewed-by: con
Task-number: QTCREATORBUG-4379
parent 09a36151
......@@ -1105,6 +1105,13 @@ EventResult FakeVimHandler::Private::handleEvent(QKeyEvent *ev)
return EventPassedToCore;
}
bool inSnippetMode = false;
QMetaObject::invokeMethod(editor(),
"inSnippetMode", Q_ARG(bool *, &inSnippetMode));
if (inSnippetMode)
return EventPassedToCore;
// Fake "End of line"
//m_tc = cursor();
......
......@@ -6159,3 +6159,8 @@ void BaseTextEditorWidget::transformSelection(Internal::TransformationMethod met
cursor.setPosition(pos, QTextCursor::KeepAnchor);
setTextCursor(cursor);
}
void BaseTextEditorWidget::inSnippetMode(bool *active)
{
*active = d->m_snippetOverlay->isVisible();
}
......@@ -345,6 +345,7 @@ private slots:
bool inFindScope(const QTextCursor &cursor);
bool inFindScope(int selectionStart, int selectionEnd);
void currentEditorChanged(Core::IEditor *editor);
void inSnippetMode(bool *active);
private:
Internal::BaseTextEditorPrivate *d;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment