Skip to content

Feature Yellow Warning: add yellow warning in vscode cmd#320

Open
phmandl wants to merge 1 commit intomathworks:mainfrom
phmandl:feature/terminal-yellow-warning-output
Open

Feature Yellow Warning: add yellow warning in vscode cmd#320
phmandl wants to merge 1 commit intomathworks:mainfrom
phmandl:feature/terminal-yellow-warning-output

Conversation

@phmandl
Copy link
Copy Markdown

@phmandl phmandl commented Apr 2, 2026

This change updates command window rendering so MATLAB output that begins with Warning: is displayed in yellow in the VS Code terminal.

image

What changed

  1. Added a yellow ANSI foreground escape sequence to terminal action keys.
  2. Updated output handling logic to:
  3. color Warning:-prefixed text yellow,
  4. keep normal stdout unchanged,
  5. keep non-stdout/error stream output red.

Why
Warnings were visually indistinguishable from normal output. This improves readability and makes warnings easier to spot without changing command behavior.

Note
This implementation is a pragmatic workaround. A better long-term approach would be for MATLAB to return a dedicated stream value for warnings (for example, stream = 2 for warnings) so warning rendering can rely on explicit metadata instead of text-prefix matching. Given current constraints, this solution is effective and low risk.

@phmandl phmandl changed the title Feature Yellow Warning: added yellow warning in vscode cmd Feature Yellow Warning: add yellow warning in vscode cmd Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant