mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 11:18:13 +00:00
LibLine: Reset the suggestion page offset when finding the max length
Otherwise, something like shift+tab->tab->tab will mess up the page contents (assuming that the max lengths in the pages are different).
This commit is contained in:
parent
54bf6a7884
commit
0f6654fef2
1 changed files with 1 additions and 0 deletions
|
@ -20,6 +20,7 @@ void XtermSuggestionDisplay::display(const SuggestionManager& manager)
|
|||
size_t longest_suggestion_length = 0;
|
||||
size_t longest_suggestion_byte_length = 0;
|
||||
|
||||
manager.set_start_index(0);
|
||||
manager.for_each_suggestion([&](auto& suggestion, auto) {
|
||||
longest_suggestion_length = max(longest_suggestion_length, suggestion.text_view.length());
|
||||
longest_suggestion_byte_length = max(longest_suggestion_byte_length, suggestion.text_string.length());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue