Skip to content

Commit 340af96

Browse files
committed
fix additional space if we have no completionPrefix
1 parent ed9941a commit 340af96

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/sqltextedit.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,9 @@ void SqlTextEdit::insertCompletion(const QString& completion)
8383
// eg. "tablename.;" if you would select a field completion and hit enter
8484
// without this workaround the text would be inserted after the ';'
8585
// because endofword moves to the end of the line
86-
if(tc.selectedText() == ".")
86+
// or we have no competionprefix at all (CTRL+SPACE) without text
87+
// under cursor
88+
if(tc.selectedText() == "." || m_Completer->completionPrefix().isEmpty())
8789
tc.movePosition(QTextCursor::Right);
8890
else
8991
tc.movePosition(QTextCursor::EndOfWord);

0 commit comments

Comments
 (0)