<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: Version 10.0.18362.356
Windows Terminal version (if applicable): dev build on 0691c21876229dc573a18473ca04bfc78c0d6803

Any other software?"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: Version 10.0.18362.356
Windows Terminal version (if applicable): dev build on 0691c21876229dc573a18473ca04bfc78c0d6803

Any other software?
</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>
<p dir="auto">Open several <code class="notranslate">cmatrix</code> tabs and see what it looks like. Some color attribute are displayed as <code class="notranslate">32m</code>. Now open a new tab and quickly type things, the buffer are likely to be messed up.</p>

<h1 dir="auto">Expected behavior</h1>
<p dir="auto">Rendering is correct.</p>
<h1 dir="auto">Actual behavior</h1>
<p dir="auto">Not really.</p>

<h1 dir="auto">Analysis</h1>
<p dir="auto">As a follow-up of <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="457755341" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/1311" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/1311/hovercard" href="https://github.com/microsoft/terminal/issues/1311">#1311</a>, in which other people also noticed this problem. It seems like one tab is affecting another when under heavy load. I've explored the code a little bit and found that it was not the case.</p>
<p dir="auto">When under heavy load, contty is lagged and compressed several sequential key event as one. For example, if I quickly typed <code class="notranslate">aaaaaaslkd</code>, the received buffer in <code class="notranslate">StateMachine::ProcessString</code> (<a href="https://github.com/microsoft/terminal/blob/master/src/terminal/parser/stateMachine.cpp#L1343">link</a>) looks like this:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="&quot;\x1b[93m\x1b[15;22Haaaaaa\x1b[?25h\x1b[m\x1b[?25l\x1b[93m\x1b[15;22Haaaaaas\x1b[?25h\x1b[m\x1b[?25l\x1b[93m\x1b[15;22Haaaaaasl\x1b[?25h\x1b[m\x1b[?25l\x1b[93m\x1b[15;22Haaaaaaslk\x1b[?25h\x1b[m\x1b[?25l\x1b[93m\x1b[15;22Haaaaaaslkd\x1b[?25h\x1b[m\x1b[?25l\x1b[93m\x1b[15;22Haaaaaas..."><pre lang="plaintext" class="notranslate"><code class="notranslate">"\x1b[93m\x1b[15;22Haaaaaa\x1b[?25h\x1b[m\x1b[?25l\x1b[93m\x1b[15;22Haaaaaas\x1b[?25h\x1b[m\x1b[?25l\x1b[93m\x1b[15;22Haaaaaasl\x1b[?25h\x1b[m\x1b[?25l\x1b[93m\x1b[15;22Haaaaaaslk\x1b[?25h\x1b[m\x1b[?25l\x1b[93m\x1b[15;22Haaaaaaslkd\x1b[?25h\x1b[m\x1b[?25l\x1b[93m\x1b[15;22Haaaaaas...
</code></pre></div>
<p dir="auto">If we break it up, it wiil be:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="\x1b[93m\x1b[15;22Haaaaaa\x1b[?25h\x1b[m\x1b[?25l
\x1b[93m\x1b[15;22Haaaaaas\x1b[?25h\x1b[m\x1b[?25l
\x1b[93m\x1b[15;22Haaaaaasl\x1b[?25h\x1b[m\x1b[?25l
\x1b[93m\x1b[15;22Haaaaaaslk\x1b[?25h\x1b[m\x1b[?25l
\x1b[93m\x1b[15;22Haaaaaaslkd\x1b[?25h\x1b[m\x1b[?25l
\x1b[93m\x1b[15;22Haaaaaas..."><pre lang="plaintext" class="notranslate"><code class="notranslate">\x1b[93m\x1b[15;22Haaaaaa\x1b[?25h\x1b[m\x1b[?25l
\x1b[93m\x1b[15;22Haaaaaas\x1b[?25h\x1b[m\x1b[?25l
\x1b[93m\x1b[15;22Haaaaaasl\x1b[?25h\x1b[m\x1b[?25l
\x1b[93m\x1b[15;22Haaaaaaslk\x1b[?25h\x1b[m\x1b[?25l
\x1b[93m\x1b[15;22Haaaaaaslkd\x1b[?25h\x1b[m\x1b[?25l
\x1b[93m\x1b[15;22Haaaaaas...
</code></pre></div>
<p dir="auto">This seems reasonable. But <code class="notranslate">StateMachine::ProcessString</code> seems to be wrongly handling this and print control string like <code class="notranslate">\x1b[?25h</code> into the screen buffer.</p>
<p dir="auto">I've look to hear you guys opinion on this one, especially <a class="user-mention notranslate" data-hovercard-type="user" data-hovercard-url="/users/zadjii-msft/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/zadjii-msft">@zadjii-msft</a> who left a comment in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="457755341" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/1311" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/1311/hovercard" href="https://github.com/microsoft/terminal/issues/1311">#1311</a>.</p>
<h1 dir="auto">Description of the new feature/enhancement</h1>
<p dir="auto">Add additional app execution aliases in addition to <code class="notranslate">wt</code></p>
<h1 dir="auto">Proposed technical implementation details (optional)</h1>
<p dir="auto">I am used to pressing Win-R then "cmd" to open up a command prompt, can you provide an option for adding <code class="notranslate">bash</code> and <code class="notranslate">cmd</code> as additional aliases (which are disabled by default).  Also detect that they are being used and start up the appropriate shell.</p>