fakevim: indent correctly after return key

This commit is contained in:
Martin Aumueller
2009-02-16 22:58:31 +01:00
parent 5f5dfaaae8
commit 694f34a4f1

View File

@@ -1293,7 +1293,8 @@ bool FakeVimHandler::Private::handleInsertMode(int key, int, const QString &text
m_submode = NoSubMode;
m_tc.insertBlock();
m_lastInsertion += "\n";
indentRegion(m_tc.block(), m_tc.block().next());
if(m_config[ConfigAutoIndent] == ConfigOn)
indentRegion(m_tc.block(), m_tc.block().next(), '\n');
} else if (key == Key_Backspace || key == control('h')) {
m_tc.deletePreviousChar();
m_lastInsertion = m_lastInsertion.left(m_lastInsertion.size() - 1);