Commit 3cae595b authored by hjk's avatar hjk
Browse files

fakevim: fix insert of Tabs

(cherry picked from commit d3cea8a4)
parent bcdcbc2f
...@@ -2628,7 +2628,7 @@ EventResult FakeVimHandler::Private::handleInsertMode(const Input &input) ...@@ -2628,7 +2628,7 @@ EventResult FakeVimHandler::Private::handleInsertMode(const Input &input)
} else if (input.isKey(Key_Tab) && hasConfig(ConfigExpandTab)) { } else if (input.isKey(Key_Tab) && hasConfig(ConfigExpandTab)) {
m_justAutoIndented = 0; m_justAutoIndented = 0;
const int ts = config(ConfigTabStop).toInt(); const int ts = config(ConfigTabStop).toInt();
const int col = physicalCursorColumnInDocument(); const int col = logicalCursorColumnInDocument();
QString str = QString(ts - col % ts, ' '); QString str = QString(ts - col % ts, ' ');
m_lastInsertion.append(str); m_lastInsertion.append(str);
insertText(str); insertText(str);
......
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