1
Fork 0
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:
AnotherTest 2020-05-22 14:02:17 +04:30 committed by Andreas Kling
parent 0446b7e347
commit 3c3edf5831
4 changed files with 95 additions and 4 deletions

View file

@ -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