From 99ca7ead37ce5ee102b6dc4bdbf977119b347fb9 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 9 Mar 2016 23:24:20 +0000 Subject: [PATCH] Only select a completion when the menu was visible (or its the only one) --- src/input_handler.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/input_handler.cc b/src/input_handler.cc index 3871398d..b1e71ed3 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -763,7 +763,11 @@ public: CandidateList& candidates = m_completions.candidates; // first try, we need to ask our completer for completions if (candidates.empty()) + { refresh_completions(CompletionFlags::None); + if (candidates.size() > 1) + return; + } if (candidates.empty()) return;