mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibLine: Redraw the suggestions when terminal size changes
This commit is contained in:
parent
3cfab83e7e
commit
e1e84fe0fe
Notes:
sideshowbarker
2024-07-18 19:24:10 +09:00
Author: https://github.com/alimpfard
Commit: e1e84fe0fe
Pull-request: https://github.com/SerenityOS/serenity/pull/6483
Issue: https://github.com/SerenityOS/serenity/issues/6471
Issue: https://github.com/SerenityOS/serenity/issues/6472
4 changed files with 34 additions and 9 deletions
|
@ -35,6 +35,8 @@ namespace Line {
|
|||
|
||||
void XtermSuggestionDisplay::display(const SuggestionManager& manager)
|
||||
{
|
||||
did_display();
|
||||
|
||||
size_t longest_suggestion_length = 0;
|
||||
size_t longest_suggestion_byte_length = 0;
|
||||
|
||||
|
@ -172,6 +174,8 @@ void XtermSuggestionDisplay::display(const SuggestionManager& manager)
|
|||
|
||||
bool XtermSuggestionDisplay::cleanup()
|
||||
{
|
||||
did_cleanup();
|
||||
|
||||
if (m_lines_used_for_last_suggestions) {
|
||||
VT::clear_lines(0, m_lines_used_for_last_suggestions);
|
||||
m_lines_used_for_last_suggestions = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue