mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +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
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