From bcba18eb2b71bb05c0a540a2194e65d461805922 Mon Sep 17 00:00:00 2001 From: JaDogg Date: Sun, 14 Dec 2014 19:44:49 +0530 Subject: [PATCH] Tab key Bug Fix --- CodeEditor/codeeditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CodeEditor/codeeditor.cpp b/CodeEditor/codeeditor.cpp index b24397e..97624e6 100644 --- a/CodeEditor/codeeditor.cpp +++ b/CodeEditor/codeeditor.cpp @@ -164,7 +164,7 @@ void CodeEditor::keyPressEvent(QKeyEvent* e) QString text(""); QStringList lines = this->textCursor().selection().toPlainText().split(QRegExp("\n|\r\n|\r")); foreach (QString line, lines) { - line.replace(QRegExp("( | | | )(.*)"), "\\2"); + line.replace(QRegExp("^( | | | )(.*)"), "\\2"); text.append(line); text.append("\n"); }