mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:47:35 +00:00
LibLine: Do not ignore ^C and do not finish() after interrupt
This commit is contained in:
parent
0d47ad7efe
commit
1a7af4d677
1 changed files with 10 additions and 8 deletions
|
@ -152,16 +152,18 @@ String Editor::get_line(const String& prompt)
|
||||||
if (m_was_resized)
|
if (m_was_resized)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
m_was_interrupted = false;
|
finish();
|
||||||
|
continue;
|
||||||
if (!m_buffer.is_empty())
|
|
||||||
printf("^C");
|
|
||||||
|
|
||||||
m_buffer.clear();
|
|
||||||
m_cursor = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
finish();
|
m_was_interrupted = false;
|
||||||
|
|
||||||
|
if (!m_buffer.is_empty())
|
||||||
|
printf("^C");
|
||||||
|
|
||||||
|
m_buffer.clear();
|
||||||
|
m_cursor = 0;
|
||||||
|
m_refresh_needed = true;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
perror("read failed");
|
perror("read failed");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue