mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibLine: Properly paginate suggestions in XtermSuggestionDisplay
This commit adds back suggestion pagination, and makes it 10x better. Also adds a "< page m of n >" indicator at the bottom if there are more suggestions than would fit in a page. It properly handles cycling forwards and backwards :^)
This commit is contained in:
parent
0446b7e347
commit
3c3edf5831
Notes:
sideshowbarker
2024-07-19 06:13:56 +09:00
Author: https://github.com/alimpfard
Commit: 3c3edf5831
Pull-request: https://github.com/SerenityOS/serenity/pull/2320
Reviewed-by: https://github.com/awesomekling
Reviewed-by: https://github.com/bugaevc
4 changed files with 95 additions and 4 deletions
|
@ -566,6 +566,7 @@ String Editor::get_line(const String& prompt)
|
|||
suggest(0, 0, Span::CodepointOriented);
|
||||
m_times_tab_pressed = 0;
|
||||
m_suggestion_manager.reset();
|
||||
m_suggestion_display->finish();
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
@ -582,6 +583,7 @@ String Editor::get_line(const String& prompt)
|
|||
}
|
||||
m_suggestion_manager.reset();
|
||||
suggest(0, 0, Span::CodepointOriented);
|
||||
m_suggestion_display->finish();
|
||||
}
|
||||
m_times_tab_pressed = 0; // Safe to say if we get here, the user didn't press TAB
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue