mirror of
https://github.com/sqlitebrowser/sqlitebrowser.git
synced 2026-01-19 18:40:13 -06:00
fix additional space if we have no completionPrefix
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user