Commit 78a206a3 authored by hjk's avatar hjk
Browse files

fakevim: fix indentation after <Return><Tab><Backspace>

parent a029a6c6
...@@ -2001,6 +2001,7 @@ EventResult FakeVimHandler::Private::handleInsertMode(int key, int, ...@@ -2001,6 +2001,7 @@ EventResult FakeVimHandler::Private::handleInsertMode(int key, int,
moveUp(count() * (linesOnScreen() - 2)); moveUp(count() * (linesOnScreen() - 2));
m_lastInsertion.clear(); m_lastInsertion.clear();
} else if (key == Key_Tab && hasConfig(ConfigExpandTab)) { } else if (key == Key_Tab && hasConfig(ConfigExpandTab)) {
m_justAutoIndented = 0;
int ts = config(ConfigTabStop).toInt(); int ts = config(ConfigTabStop).toInt();
int col = cursorColumnInDocument(); int col = cursorColumnInDocument();
QString str = QString(ts - col % ts, ' '); QString str = QString(ts - col % ts, ' ');
...@@ -2016,7 +2017,7 @@ EventResult FakeVimHandler::Private::handleInsertMode(int key, int, ...@@ -2016,7 +2017,7 @@ EventResult FakeVimHandler::Private::handleInsertMode(int key, int,
} else { } else {
joinPreviousEditBlock(); joinPreviousEditBlock();
} }
m_justAutoIndented = false; m_justAutoIndented = 0;
m_lastInsertion.append(text); m_lastInsertion.append(text);
if (m_submode == ReplaceSubMode) { if (m_submode == ReplaceSubMode) {
if (atEndOfLine()) if (atEndOfLine())
......
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