mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-25 10:48:53 +00:00
LibLine: Reset suggestion index back to zero when fetching new ones
This commit is contained in:
parent
941550e601
commit
dbc2b746b8
Notes:
sideshowbarker
2024-07-17 22:55:25 +09:00
Author: https://github.com/alimpfard
Commit: dbc2b746b8
Pull-request: https://github.com/SerenityOS/serenity/pull/12908
1 changed files with 1 additions and 0 deletions
|
@ -1061,6 +1061,7 @@ void Editor::handle_read_event()
|
||||||
// further tabs simply show the cached completions.
|
// further tabs simply show the cached completions.
|
||||||
if (m_times_tab_pressed == 1) {
|
if (m_times_tab_pressed == 1) {
|
||||||
m_suggestion_manager.set_suggestions(on_tab_complete(*this));
|
m_suggestion_manager.set_suggestions(on_tab_complete(*this));
|
||||||
|
m_suggestion_manager.set_start_index(0);
|
||||||
m_prompt_lines_at_suggestion_initiation = num_lines();
|
m_prompt_lines_at_suggestion_initiation = num_lines();
|
||||||
if (m_suggestion_manager.count() == 0) {
|
if (m_suggestion_manager.count() == 0) {
|
||||||
// There are no suggestions, beep.
|
// There are no suggestions, beep.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue