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

Ctrl + h's behavior is differ from command prompt window #4397

Closed
koron opened this issue Jan 29, 2020 · 11 comments
Closed

Ctrl + h's behavior is differ from command prompt window #4397

koron opened this issue Jan 29, 2020 · 11 comments
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@koron
Copy link

koron commented Jan 29, 2020

Environment

Windows build number: Microsoft Windows [Version 10.0.18363.592]
Windows Terminal version (if applicable): 0.8.10261.0

Any other software? no

Steps to reproduce

just type Ctrl + h

Expected behavior

Delete a character before the cursor, as same as command prompt window.

Actual behavior

Delete a whole word before the cursor.

Notes

I guess that this is a side effect of #3935

@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 Jan 29, 2020
@koron koron changed the title <kbd>Ctrl + h</kbd> behavior is differ from command prompt window Ctrl + h's behavior is differ from command prompt window Jan 29, 2020
@koron
Copy link
Author

koron commented Jan 30, 2020

it affects vim in cmd in WindowsTerminal.

when i hit Ctrl+h in insert mode, i got Îz.

image

I expected to delete a character before the cursor.

@DHowett-MSFT
Copy link
Contributor

So, this is one of those issues we might just have to live with for now. ^H means, to many other applications, the same thing as Ctrl+Backspace. To the rest of them, it means Backspace. It looks like Vim for Windows has an explicit binding for <C-H>, but now it's receiving <C-Bksp>. In Vim for LInux this works fine.

We may need to wait for /dup #879 so that Windows Vim can use raw key mode.

@ghost
Copy link

ghost commented Jan 31, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed Jan 31, 2020
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed 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 Jan 31, 2020
@moetayuko
Copy link

@DHowett-MSFT I encountered the same issue, but don't think it's related to Vim for Windows.

Here's my result:

Setup Result
WT (wsl) + Vim Y
WT (wsl) + Vim over OpenSSH_8.1p1 Y
WT (powershell) + Vim over OpenSSH_for_Windows_7.7p1 N
WT (cmd) + Vim over OpenSSH_for_Windows_7.7p1 N
powershell.exe + Vim over OpenSSH_for_Windows_7.7p1 Y

@DHowett-MSFT
Copy link
Contributor

This is one of those weird things 😄 WT and OpenSSH_for_Windows actually use the same translation backend to talk to windows console applications, but WT uses a newer version of it. The older version was more compatible with certain windows apps, but it worked less well with everything else.

@koron
Copy link
Author

koron commented Feb 3, 2020

this problem is introduced by #3935 .
#3935 solved only one problem which describled in #879 in wrong way.
so i think that #3935 should be reverted.

@DHowett-MSFT
Copy link
Contributor

The problem is that 3935 solved the problem described in 879 the only way that is correct for a Terminal emulator. We're right here on the boundary between what consoles and terminals need to support, and we made the call to be a terminal first.

I'm not certain that was the right decision?

@debuuu
Copy link

debuuu commented Feb 9, 2020

The bot mentioned a "referenced thread", where is that? Would like to track this, it broke some Vim muscle memory for me.

@DHowett-MSFT
Copy link
Contributor

Sorry @debuuu - it's referring to #879

@koron
Copy link
Author

koron commented Feb 14, 2020

the problem is that the terminal generate same codes 0x08 for ctrl+h and ctrl+backspace.
but #3935 resolved it by parsing the code (0x08) as ctrl+backspace always.

i don't think this is correct way to fix.

@wmertens
Copy link

wmertens commented Apr 3, 2020

I'm probably re-hashing old conversations, sorry, it's hard to read all threads on GitHub.

How about sending esc+ctrl-h? That seems to always work in the shells I came across?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

5 participants