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

vi in Windows Terminal does not properly insert #12074

Closed
theking2 opened this issue Dec 31, 2021 · 8 comments
Closed

vi in Windows Terminal does not properly insert #12074

theking2 opened this issue Dec 31, 2021 · 8 comments
Labels
Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Product-Terminal The new Windows Terminal.

Comments

@theking2
Copy link

Windows Terminal version

1.11.3471.0

Windows build number

22000.376

Other Software

vi 1:070224-5

Steps to reproduce

in vi switch to insert mode ('i')
type text
esc

Expected Behavior

Existing text moves right new text is inserted.

Actual Behavior

Existing text is overwritten on screen but not on file
vi-in windows-terminal

@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 Dec 31, 2021
@zadjii-msft
Copy link
Member

@theking2 Are you using vim in WSL, or vim.exe? If you're in WSL, which distro, and what's TERM set to?

IIRC I saw this once before the break in WSL vim myself, but never had the chance to file formally.

@zadjii-msft zadjii-msft added Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Product-Terminal The new Windows Terminal. labels Jan 3, 2022
@ghost ghost added the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Jan 7, 2022
@ghost
Copy link

ghost commented Jan 7, 2022

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost ghost closed this as completed Jan 10, 2022
@wrbp504
Copy link

wrbp504 commented Jan 21, 2022

I have the same problem with vi (not vim as the question states) editor on Unix machine. In my case using Windows Terminal/CMD/ssh to connect to the unix machine with TERM=xterm

@ghost ghost removed the No-Recent-Activity This issue/PR is going stale and may be auto-closed without further activity. label Jan 21, 2022
@theking2
Copy link
Author

theking2 commented Jan 22, 2022

My situation exactly: connecting to Linux janus 5.16.0-arch1-1

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jan 22, 2022
@elsaco
Copy link

elsaco commented Jan 23, 2022

On same Win 11 host (with default SSH client) the issue is not observed when using Alacritty. The first line after inserting foo:

vi_insert_test

Remote vi used for testing:

[tux@kvmArch ~]$ pacman -Qi vi
Name            : vi
Version         : 1:070224-5
Description     : The original ex/vi text editor
Architecture    : x86_64
URL             : http://ex-vi.sourceforge.net/
Licenses        : custom:ex
Groups          : None
Provides        : None
Depends On      : ncurses
Optional Deps   : s-nail: used by the preserve command for notification
Required By     : None
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 315.50 KiB
Packager        : Evangelos Foutras <[email protected]>
Build Date      : Mon 10 May 2021 01:18:36 AM PDT
Install Date    : Sat 22 Jan 2022 06:58:32 PM PST
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

@wrbp504
Copy link

wrbp504 commented Jan 23, 2022

Thanks, the issue does not present on many other terminals (putty, etc), but the question is specific for using windows terminal, why is this closed?

@j4james
Copy link
Collaborator

j4james commented Jan 23, 2022

I wonder if this is perhaps the result of us not supporting insert/replace mode (see issue #1947). If someone that can reproduce the issue can capture a log with the debug tap, that might help determine the source of the problem.

@inphobia
Copy link

i can reproduce this with windows terminal versions:

  • 1.11.3471.0 - current stable
  • 1.12.3472.0 - current preview
    on windows enterprise 21h1 - 19043.1415 (hm, need to upate it seems)

this with cygwin running in wt, as well as several wsl2 distros in wt. reproduced in vi, either a vi.exe running in a cygwin tab, vi on wsl, or vi via cygwin ssh or wsl ssh to real linux machines.
verified to not be an issue when using either the corresping app for the distro nor with the native cygwin terminal (mintty).

when enabling debug mode in terminal 1.11.3471.0 however it just crashes (not just the new tab but all tabs). it does work in preview so i can get debug tap output from that.

pasting a decent amount of lines is vi (haven't found upper or lower limits nor if linelight has any influence), but around 100 lines mostly get's at least a few lines which don't match the input. doing a whole bunch of lines (lets say 2500) almost always puts me in some kind of mode where vi seems to only get command characters no matter what i type. only way out is killin the process via another session.

being that the debug output is quite big, and seems to include quite a few control characters, i wonder what the best way is to capture it and get it to you.
for capturing i can select everything with the mouse, but i haven't an option to either copy all output to a file or select all the text at once (looking throught the default config json as well).

(i thought i also mentioned this in a few other issues here but can't for the life of me find them)0

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

6 participants