Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrow keys don't work in Vim in Azure Cloud Shell #4589

Closed
chunliu opened this issue Feb 14, 2020 · 0 comments · Fixed by #4652
Closed

Arrow keys don't work in Vim in Azure Cloud Shell #4589

chunliu opened this issue Feb 14, 2020 · 0 comments · Fixed by #4652
Labels
Area-AzureShell Workitems pertaining to the Azure Cloud Shell connection. Area-Input Related to input processing (key presses, mouse, etc.) Area-VT Virtual Terminal sequence support Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@chunliu
Copy link

chunliu commented Feb 14, 2020

Environment

Windows build number: 10.0.19041.0
Windows Terminal version (if applicable): 0.9.433.0

Steps to reproduce

  1. Open Azure Cloud Shell.
  2. Open Vim, such as vim ./.bashrc.
  3. Try to move the cursor with the arrow keys. It doesn't work and an error shows up with the left arrow key: E388: Couldn't find definition.

Expected behavior

Should be able to move the cursor with the arrow keys.

Actual behavior

Cannot move the cursor with the arrow keys and an error shows up with the left arrow key: E388: Couldn't find definition.
echo $TERM shows xterm-256color

Workaround

In ~/.vimrc, add :set term=builtin_ansi and then the arrow keys start working in Vim.
This issue seems only happen with Azure Cloud Shell. It doesn't happen with wsl.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Feb 14, 2020
@zadjii-msft zadjii-msft added Product-Terminal The new Windows Terminal. Area-AzureShell Workitems pertaining to the Azure Cloud Shell connection. Area-Input Related to input processing (key presses, mouse, etc.) Area-VT Virtual Terminal sequence support Issue-Bug It either shouldn't be doing this or needs an investigation. labels Feb 18, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Feb 19, 2020
DHowett-MSFT pushed a commit that referenced this issue Feb 20, 2020
This commit introduces a small console-subsystem application whose sole
job is to consume TerminalConnection.dll and hook it up to something
other than Terminal. It is 99% of the way to a generic solution.

I've introduced a stopgap in TerminalPage that makes sure we launch
TerminalAzBridge using ConptyConnection instead of AzureConnection.

As a bonus, this commit includes a class whose sole job it is to make
reading VT input off a console handle not terrible. It returns you a
string and dispatches window size change callbacks.

Fixes #2267.
Fixes #4589.
Related to #2266 (since pwsh needs better VT).
@ghost ghost added the In-PR This issue has a related PR label Feb 20, 2020
@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Feb 20, 2020
@DHowett-MSFT DHowett-MSFT added this to the Terminal v1.0 milestone Feb 20, 2020
DHowett-MSFT pushed a commit that referenced this issue Feb 21, 2020
This commit introduces a small console-subsystem application whose sole
job is to consume TerminalConnection.dll and hook it up to something
other than Terminal. It is 99% of the way to a generic solution.

I've introduced a stopgap in TerminalPage that makes sure we launch
TerminalAzBridge using ConptyConnection instead of AzureConnection.

As a bonus, this commit includes a class whose sole job it is to make
reading VT input off a console handle not terrible. It returns you a
string and dispatches window size change callbacks.

Fixes #2267.
Fixes #4589.
Related to #2266 (since pwsh needs better VT).
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed In-PR This issue has a related PR labels Feb 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-AzureShell Workitems pertaining to the Azure Cloud Shell connection. Area-Input Related to input processing (key presses, mouse, etc.) Area-VT Virtual Terminal sequence support Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants