ITADN

`ctrl-c` does nothing in PowerShell terminal (prompt and running programs)

#62442Openmarioparaschiv 创建于 11 天前
area:integrations/terminalplatform:windowsstate:needs reproreach:some usersseverity:S2
M
marioparaschivcommented
### Reproduction steps 1. Open a built-in terminal in Zed. 2. Set the shell to PowerShell 7 (`pwsh`), running with Starship as the prompt, loaded from my PowerShell profile. 3. Hit `ctrl-c`, either at an empty prompt, with typed but unsubmitted text, or while a program is running. 4. Nothing happens in any of those cases. Unlike #41071 (reported for `bash`/`sh`, where `ctrl-c` still killed running programs and only failed at the empty prompt), here `ctrl-c` does nothing at all in PowerShell. It won't clear the prompt and it won't interrupt a running program. Opening this separately for PowerShell per https://github.com/zed-industries/zed/issues/41071#issuecomment-5243264907. The log shows a repeated background hang in the terminal every time conpty starts (`crates/terminal/src/terminal.rs:3186`), which may be related. ### Current vs. Expected behavior Current: `ctrl-c` has no effect in the PowerShell terminal. Typed text isn't cleared, and a running program keeps going instead of being interrupted. Expected: at the prompt, the text is discarded, `^C` is shown, and a fresh empty prompt appears. While a program runs, `ctrl-c` should interrupt and stop it. ### Zed version and system specs Zed: 1.14.2+stable.337 (02abf5b08fa12c1c20a155ae3f796ef4c6c1a01e) OS: Windows 11 Pro 10.0.26200 (Build 26200) Memory: 32 GiB Architecture: x64 ### Attach Zed log file <details><summary>Zed.log</summary> ```log 2026-08-10T17:37:23+01:00 INFO [zed::reliability::hang_detection::logging] Background hang detected on Unknown: Tasks(s) that ran too long 133.0392ms - crates\terminal\src\terminal.rs:3186:38 2026-08-10T17:37:23+01:00 INFO [zed::reliability::hang_detection] Task trace has been saved to: ...\hang_traces\hang-2026-08-10_17-37-23.miniprof.json 2026-08-10T17:37:24+01:00 INFO [alacritty_terminal::tty::windows::conpty] Using conpty.dll for pseudoconsole ``` </details> ### Relevant Zed settings <details><summary>settings.json</summary> ```json "terminal": { "show_count_badge": false, "dock": "bottom", "toolbar": { "breadcrumbs": false }, "button": true, "font_size": 12.0, "font_family": "MonoLisa NF", "font_fallbacks": ["MonoLisa"], "cursor_shape": "bar", "blinking": "on" }, "base_keymap": "VSCode" ``` </details> ### Relevant Keymap <details><summary>keymap.json</summary> No custom keymap.json. Using the default VSCode base keymap (`"base_keymap": "VSCode"`). </details> ### Related - #41071 (same symptom for `bash`/`sh`) and the comment suggesting a separate PowerShell issue: https://github.com/zed-industries/zed/issues/41071#issuecomment-5243264907
1 条评论