You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Open a terminal buffer, run some sort of command that uses ANSI sequences.
This is vague, I know, but multiple things trigger this for me. The quickest way is to compile the Zig hello world program (as described here). I also have a nodejs webpack build which causes this crash when the webpack-dev-server reports an error, and not when it doesn't. I've tried capturing the output of the zig build for reproduction, and wasn't able to, but I'll keep trying.
The terminal buffer closes itself when the command completes, rather than returning to the shell's prompt. This closes the window regardless of how many nested shells are open.
This does not happen if the same terminal interaction is had via the powershell application. The crash also happens with shell=C:\Program Files\Git\bin\bash.exe, and also happens with Git's bash.exe as the shell when it is nested (so it's not bash that's crashing, it's some interaction with vim). This also does not happen if the "Git Bash" application included with Git for Windows is used for the same terminal interaction outside of vim.
If ++noclose is used, the terminal tab is shown as 'finished'.
Expected behaviour
The same as the behavior exhibited by these shells outside of vim (or gvim), that it successfully returns to the prompt.
Version of Vim
9.0.2189
Environment
Operating System: Windows 10 22H2 (also seen on an older version, 20H?)
Git Version: 2.45.2, also seen on an older version 2.40.?
bash.exe --version: GNU bash, version 5.2.26(1)-release (x86_64-pc-msys)
terminal: powershell.exe, but also happens in gvim
$TERM: outside vim/gvim there isn't an environment variable with that name
- powershell.exe reports it as undefined
- bash.exe reports TERM=cygwin within a vim terminal buffer and TERM=xterm-256color outside
A note: when powershell.exe is the shell in vim's terminal buffer there's a winpty-agent.exe running as a child of the vim process. This isn't the case when using Git's bash.exe so I don't think it's causing the issue. I mention it because :h terminal-ms-windows says it is no longer required in newer versions of Windows 10.
Logs and stack traces
When the terminal buffer closes, `:messages` shows nothing.
Messages maintainer: The Vim Project
E282: Cannot read from "nonexistent"
Press ENTER or typecommand to continue
I'm not sure where else to look, but there's no apparent error message.
The text was updated successfully, but these errors were encountered:
I have no idea why this would close the buffer. Please try to capture all the output ANSI escape sequences. script(1) should be able to do it. But then we will need to figure out what's going on. Not sure how hard this will be.
I noticed powershell spitting out an unparsed escape sequence, and printed it from a simple C program (although I'm sure there's a bash one-liner to print the same thing). This crashes powershell.exe/bash.exe/cmd.exe inside vim, and cmd.exe outside of vim. I'm not sure when it started crashing for cmd.exe outside of vim, but I did test that previously, where it wasn't crashing, and the issue isn't intermittent.
Steps to reproduce
C:\Program Files\Git\bin\bash.exe
, and also happens with Git's bash.exe as the shell when it is nested (so it's not bash that's crashing, it's some interaction with vim). This also does not happen if the "Git Bash" application included with Git for Windows is used for the same terminal interaction outside of vim.++noclose
is used, the terminal tab is shown as 'finished'.Expected behaviour
The same as the behavior exhibited by these shells outside of vim (or gvim), that it successfully returns to the prompt.
Version of Vim
9.0.2189
Environment
Operating System: Windows 10 22H2 (also seen on an older version, 20H?)
Git Version: 2.45.2, also seen on an older version 2.40.?
bash.exe --version: GNU bash, version 5.2.26(1)-release (x86_64-pc-msys)
terminal: powershell.exe, but also happens in gvim
$TERM: outside vim/gvim there isn't an environment variable with that name
- powershell.exe reports it as undefined
- bash.exe reports
TERM=cygwin
within a vim terminal buffer andTERM=xterm-256color
outsideA note: when powershell.exe is the shell in vim's terminal buffer there's a winpty-agent.exe running as a child of the vim process. This isn't the case when using Git's bash.exe so I don't think it's causing the issue. I mention it because
:h terminal-ms-windows
says it is no longer required in newer versions of Windows 10.Logs and stack traces
I'm not sure where else to look, but there's no apparent error message.
The text was updated successfully, but these errors were encountered: