summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/input_handler.cc')
-rw-r--r--src/input_handler.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/input_handler.cc b/src/input_handler.cc
index a36d13f1..08bcdd51 100644
--- a/src/input_handler.cc
+++ b/src/input_handler.cc
@@ -815,9 +815,10 @@ public:
const bool has_completions = not m_completions.candidates.empty();
const bool completion_selected = m_current_completion != -1;
const bool text_entered = m_completions.start != line.byte_count_to(m_line_editor.cursor_pos());
+ const bool at_end = line.byte_count_to(m_line_editor.cursor_pos()) == line.length();
return (m_completions.flags & Completions::Flags::Menu) and
has_completions and
- not completion_selected and
+ not completion_selected and at_end and
(not (m_completions.flags & Completions::Flags::NoEmpty) or text_entered);
};