From 364ca1f4768cd23e554b418781760d31b23ea643 Mon Sep 17 00:00:00 2001 From: AnotherTest Date: Mon, 20 Apr 2020 22:05:31 +0430 Subject: LibLine: Autocomplete already-complete suggestions Suggesting whatever the user has input is not quite sane :^) --- Libraries/LibLine/Editor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Libraries') 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; -- cgit v1.2.3