Skip to content

Commit

Permalink
Use feed_child ()
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Wootten authored and Jeremy Wootten committed Dec 16, 2024
1 parent 96d3966 commit 7a95e2d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Widgets/TerminalWidget.vala
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,8 @@ namespace Terminal {
_("Clear Screen"))
) {
// Should we clear scrollback too?
run_program ("clear -x", null);
// We know there is no foreground process so we can just feed the command in
feed_child ("clear -x\n".data);
}
}

Expand All @@ -544,7 +545,8 @@ namespace Terminal {
_("Reset"))
) {
// This also clears the screen and the scrollback
run_program ("reset", null);
// We know there is no foreground process so we can just feed the command in
feed_child ("reset\n".data);
}
}

Expand Down

0 comments on commit 7a95e2d

Please sign in to comment.