mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:17:44 +00:00
LibLine: Use Core::EventLoop for outer read loop
This commit changes LibLine's internal structure to work in an event loop, and as a result, also switches it to being a Core::Object.
This commit is contained in:
parent
8e6df3949d
commit
70a213a6ec
7 changed files with 583 additions and 517 deletions
|
@ -110,10 +110,9 @@ Core::EventLoop loop;
|
|||
int run(Function<void(const char*, size_t)> fn)
|
||||
{
|
||||
if (interactive) {
|
||||
Line::Editor editor;
|
||||
editor.initialize();
|
||||
auto editor = Line::Editor::construct();
|
||||
for (;;) {
|
||||
auto line_result = editor.get_line("> ");
|
||||
auto line_result = editor->get_line("> ");
|
||||
|
||||
if (line_result.is_error())
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue