Skip to content

Commit

Permalink
Don't use suggestions if object searched is not found
Browse files Browse the repository at this point in the history
Closes: #604
  • Loading branch information
375gnu committed Jan 20, 2022
1 parent f969b37 commit 6a3f93a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/celestia/celestiacore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 6a3f93a

Please sign in to comment.