mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:07:35 +00:00
LibVT+Everywhere: Introduce 'automarks' and 'clear previous command'
Automarks are similar to bookmarks placed by the terminal, allowing the user to selectively remove a single command and its output from the terminal scrollback. This commit implements a single way to add marks: automatically placing them when the shell becomes interactive. To make sure the shell behaves correctly after its expected prompt position changes, the terminal layer forces a resize event to be passed to the shell on such (possibly) partial clears; this also has the nice side effect of fixing the disappearing prompt on the preexisting "clear including history" action: Fixes #4192.
This commit is contained in:
parent
cde528fdd9
commit
54ab6fe5b9
12 changed files with 238 additions and 0 deletions
|
@ -42,6 +42,8 @@ ErrorOr<void> TerminalWrapper::run_command(ByteString const& command, Optional<B
|
|||
m_pid = TRY(Core::System::fork());
|
||||
|
||||
if (m_pid > 0) {
|
||||
m_terminal_widget->set_startup_process_id(m_pid);
|
||||
|
||||
if (wait_for_exit == WaitForExit::Yes) {
|
||||
GUI::Application::the()->event_loop().spin_until([this]() {
|
||||
return m_child_exited;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue