diff --git a/krunner/view.cpp b/krunner/view.cpp --- a/krunner/view.cpp +++ b/krunner/view.cpp @@ -361,12 +361,12 @@ return; } - if (!KAuthorized::authorize(QStringLiteral("lineedit_text_completion"))) { + // Mimic shell behavior of not storing lines starting with a space + if (item.at(0).isSpace()) { return; } - // Mimic shell behavior of not storing lines starting with a space - if (item.at(0).isSpace()) { + if (!KAuthorized::authorize(QStringLiteral("lineedit_text_completion"))) { return; }