summaryrefslogtreecommitdiff
path: root/Libraries/LibLine
diff options
context:
space:
mode:
authorAnotherTest <ali.mpfard@gmail.com>2020-04-20 22:05:31 +0430
committerAndreas Kling <kling@serenityos.org>2020-04-20 20:23:26 +0200
commit364ca1f4768cd23e554b418781760d31b23ea643 (patch)
tree8881a63098f72cb303952f4f98f49485874d7305 /Libraries/LibLine
parentf9b0490383bc1bb20b3c739b62810ac03e21ac99 (diff)
downloadserenity-364ca1f4768cd23e554b418781760d31b23ea643.zip
LibLine: Autocomplete already-complete suggestions
Suggesting whatever the user has input is not quite sane :^)
Diffstat (limited to 'Libraries/LibLine')
-rw-r--r--Libraries/LibLine/Editor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Libraries/LibLine/Editor.cpp b/Libraries/LibLine/Editor.cpp
index e5ac5fec78..84906d365c 100644
--- a/Libraries/LibLine/Editor.cpp
+++ b/Libraries/LibLine/Editor.cpp
@@ -416,7 +416,7 @@ String Editor::get_line(const String& prompt)
auto current_suggestion_index = m_next_suggestion_index;
if (m_next_suggestion_index < m_suggestions.size()) {
- auto can_complete = m_next_suggestion_invariant_offset < m_largest_common_suggestion_prefix_length;
+ auto can_complete = m_next_suggestion_invariant_offset <= m_largest_common_suggestion_prefix_length;
if (!m_last_shown_suggestion.text.is_null()) {
size_t actual_offset;
size_t shown_length = m_last_shown_suggestion_display_length;