1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 06:48:12 +00:00

LibLine: Autocomplete already-complete suggestions

Suggesting whatever the user has input is not quite sane :^)
This commit is contained in:
AnotherTest 2020-04-20 22:05:31 +04:30 committed by Andreas Kling
parent f9b0490383
commit 364ca1f476

View file

@ -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;