From 340af96deb7f0f8ab3018021e0f1e882157e6eb3 Mon Sep 17 00:00:00 2001 From: Peinthor Rene Date: Fri, 29 Mar 2013 14:54:25 +0100 Subject: [PATCH] fix additional space if we have no completionPrefix --- src/sqltextedit.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sqltextedit.cpp b/src/sqltextedit.cpp index a1c452f4..d443facc 100644 --- a/src/sqltextedit.cpp +++ b/src/sqltextedit.cpp @@ -83,7 +83,9 @@ void SqlTextEdit::insertCompletion(const QString& completion) // eg. "tablename.;" if you would select a field completion and hit enter // without this workaround the text would be inserted after the ';' // because endofword moves to the end of the line - if(tc.selectedText() == ".") + // or we have no competionprefix at all (CTRL+SPACE) without text + // under cursor + if(tc.selectedText() == "." || m_Completer->completionPrefix().isEmpty()) tc.movePosition(QTextCursor::Right); else tc.movePosition(QTextCursor::EndOfWord);