Hide completion popup when cursor is at first position (#2929)

Prevents user autocompletion menu from appearing in unwanted scenarios
This commit is contained in:
Tal Neoran 2021-06-27 15:47:14 +03:00 committed by GitHub
parent 07231e57c9
commit e1895de7f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -480,7 +480,7 @@ void SplitInput::updateCompletionPopup()
auto text = edit.toPlainText();
auto position = edit.textCursor().position() - 1;
if (text.length() == 0)
if (text.length() == 0 || position == -1)
{
this->hideCompletionPopup();
return;