From e1895de7f38f69b05691c8dd7aeb6a786bc0ec66 Mon Sep 17 00:00:00 2001 From: Tal Neoran Date: Sun, 27 Jun 2021 15:47:14 +0300 Subject: [PATCH] Hide completion popup when cursor is at first position (#2929) Prevents user autocompletion menu from appearing in unwanted scenarios --- src/widgets/splits/SplitInput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/splits/SplitInput.cpp b/src/widgets/splits/SplitInput.cpp index 91be55d62..16cb2317b 100644 --- a/src/widgets/splits/SplitInput.cpp +++ b/src/widgets/splits/SplitInput.cpp @@ -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;