From 6a3f93a29549a49ca1c4aa12efeeb6cf67be3ca5 Mon Sep 17 00:00:00 2001 From: Hleb Valoshka <375gnu@gmail.com> Date: Thu, 20 Jan 2022 18:45:39 +0200 Subject: [PATCH] Don't use suggestions if object searched is not found Closes: #604 --- src/celestia/celestiacore.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/celestia/celestiacore.cpp b/src/celestia/celestiacore.cpp index 0bd91ebba..93599699e 100644 --- a/src/celestia/celestiacore.cpp +++ b/src/celestia/celestiacore.cpp @@ -1045,10 +1045,12 @@ void CelestiaCore::charEntered(const char *c_p, int modifiers) if (typedText != "") { Selection sel = sim->findObjectFromPath(typedText, true); +#ifdef AUTO_COMPLETION if (sel.empty() && typedTextCompletion.size() > 0) { sel = sim->findObjectFromPath(typedTextCompletion[0], true); } +#endif if (!sel.empty()) { addToHistory();