diff options
author | Ali Mohammad Pur <ali.mpfard@gmail.com> | 2022-03-06 18:00:28 +0330 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-03-06 15:34:27 +0100 |
commit | dbc2b746b8eb51bde3c6c5872f82f7c2046365b4 (patch) | |
tree | 9d2a1f22fdab1b09778de80e9132c4ddf9ebb993 /Userland/Libraries/LibLine | |
parent | 941550e601b2976dcaddb837520d43e28b7895be (diff) | |
download | serenity-dbc2b746b8eb51bde3c6c5872f82f7c2046365b4.zip |
LibLine: Reset suggestion index back to zero when fetching new ones
Diffstat (limited to 'Userland/Libraries/LibLine')
-rw-r--r-- | Userland/Libraries/LibLine/Editor.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Userland/Libraries/LibLine/Editor.cpp b/Userland/Libraries/LibLine/Editor.cpp index 847d4f5dc2..bbf6708839 100644 --- a/Userland/Libraries/LibLine/Editor.cpp +++ b/Userland/Libraries/LibLine/Editor.cpp @@ -1061,6 +1061,7 @@ void Editor::handle_read_event() // further tabs simply show the cached completions. if (m_times_tab_pressed == 1) { m_suggestion_manager.set_suggestions(on_tab_complete(*this)); + m_suggestion_manager.set_start_index(0); m_prompt_lines_at_suggestion_initiation = num_lines(); if (m_suggestion_manager.count() == 0) { // There are no suggestions, beep. |