Skip to content

Commit

Permalink
Prevent failed block from appearing before show command output
Browse files Browse the repository at this point in the history
  • Loading branch information
sedwards2009 committed Feb 1, 2024
1 parent 2625317 commit 45c3817
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main/src/terminal/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1380,7 +1380,8 @@ export class Terminal implements Tab, Disposable {
const scrollbackOutputLength = terminalBlock.getScrollbackLength() - this.#frameStartBookmark.row;
const effectiveScreenLength = this.#emulator.getCursorRow();

const commandShouldBeFramed = returnCode !== "0" || this.#commandNeedsFrame(this.#lastCommandLine,
const isSuccess = returnCode === "0" || returnCode === "";
const commandShouldBeFramed = !isSuccess || this.#commandNeedsFrame(this.#lastCommandLine,
scrollbackOutputLength + effectiveScreenLength);
if (commandShouldBeFramed) {
this.#disconnectLastTerminalFrameFromEmulator();
Expand Down

0 comments on commit 45c3817

Please sign in to comment.