<h1 dir="auto">Environment</h1>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Windows build number: [10.0.18362.295]
Windows Terminal version (if applicable): 0.4.2382.0

Any other software?

MSYS2 / MINGW64:

  $ uname -srvo
  MINGW64_NT-10.0-18362 3.0.7-338.x86_64 2019-07-11 10:58 UTC Msys

  $ bash --version
  GNU bash, version 4.4.23(1)-release (x86_64-pc-msys)

Emacs from MSYS2's mingw64/mingw-w64-x86_64-emacs package:

  (emacs-version)
  &quot;GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
   of 2019-06-03&quot;
"><pre lang="none" class="notranslate"><code class="notranslate">Windows build number: [10.0.18362.295]
Windows Terminal version (if applicable): 0.4.2382.0

Any other software?

MSYS2 / MINGW64:

  $ uname -srvo
  MINGW64_NT-10.0-18362 3.0.7-338.x86_64 2019-07-11 10:58 UTC Msys

  $ bash --version
  GNU bash, version 4.4.23(1)-release (x86_64-pc-msys)

Emacs from MSYS2's mingw64/mingw-w64-x86_64-emacs package:

  (emacs-version)
  "GNU Emacs 26.2 (build 1, x86_64-w64-mingw32)
   of 2019-06-03"

</code></pre></div>
<h1 dir="auto">Steps to reproduce</h1>

<ul dir="auto">
<li>
<p dir="auto">Run MSYS2 / MINGW64 bash in Windows Terminal, e.g. in a CMD tab with<br>
<code class="notranslate">set MSYSTEM=MINGW64&amp;&amp; c:\msys64\usr\bin\bash --login -i</code></p>
</li>
<li>
<p dir="auto">Run Emacs in the terminal (<code class="notranslate">emacs -nw</code>) and quit it immediately</p>
</li>
<li>
<p dir="auto">Back at the bash prompt, enter a few characters, say <code class="notranslate">123</code></p>
</li>
<li>
<p dir="auto">Press the left-arrow as often as needed to move the cursor to the<br>
beginning of the line (in this example 3 times)</p>
</li>
<li>
<p dir="auto">Enter some other characters</p>
</li>
</ul>
<h1 dir="auto">Expected behavior</h1>

<ul dir="auto">
<li>
<p dir="auto">The cursor moves with the left-arrow keystrokes to the beginning of the line</p>
</li>
<li>
<p dir="auto">New text appears line start</p>
</li>
</ul>
<h1 dir="auto">Actual behavior</h1>

<ul dir="auto">
<li>
<p dir="auto">The cursor stays at the end of the line, although the internal position is updated<br>
and new text appears at line start.</p>
</li>
<li>
<p dir="auto">When I delete text using Backspace or Delete, the cursor jumps to the correct position,<br>
but jumps back to the end of line when new text is entered.</p>
</li>
</ul>
<p dir="auto">It seems that MINGW Emacs and MSYS2 bash don't play well in Windows Terminal -- in<br>
the classic Windows console there is no issue.</p>
<p dir="auto">This might be related to <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="485989908" data-permission-text="Title is private" data-url="https://github.com/microsoft/terminal/issues/2561" data-hovercard-type="issue" data-hovercard-url="/microsoft/terminal/issues/2561/hovercard" href="https://github.com/microsoft/terminal/issues/2561">#2561</a>.</p>
<h1 dir="auto">Summary of the new feature/enhancement</h1>

<h1 dir="auto">Proposed technical implementation details (optional)</h1>