helix
helix copied to clipboard
`CTRL+c` causes Helix to crash after Nushell LSP crashes
Summary
After Nushell LSP crashes, pressing CTRL+c
causes Helix to crash.
Related Nushell LSP issue: https://github.com/nushell/nushell/issues/13582
Reproduction Steps
Press CTRL+c
after Nushell LSP crashes, reproducible in both INSERT
and NORMAL
modes
LSP crash repro:
- Have Nushell 0.96.1 installed
- Create a .nu file with contents
'бана яблук'
(these are fragments of two words in Ukrainian, I played around with removing characters and this is the minimal reproduction case I came up with) - Open this file with Helix
- Add a newline and type
echo
, with this example LSP crashes after enteringec
See https://github.com/nushell/nushell/issues/13582 for details
Helix log
~/.cache/helix/helix.log
Only LSP crash is caught in logs
2024-08-10T02:44:29.468 helix_lsp::transport [ERROR] nu-lsp err <- "Error: × Main thread panicked.\n"
2024-08-10T02:44:29.469 helix_lsp::transport [ERROR] nu-lsp err <- " ├─▶ at crates\\nu-lsp\\src\\lib.rs:557:69\n"
2024-08-10T02:44:29.469 helix_lsp::transport [ERROR] nu-lsp err <- " ╰─▶ byte index 15 is not a char boundary; it is inside 'л' (bytes 14..16) of\n"
2024-08-10T02:44:29.469 helix_lsp::transport [ERROR] nu-lsp err <- " `'бана яблук'\n"
2024-08-10T02:44:29.469 helix_lsp::transport [ERROR] nu-lsp err <- " ec\n"
2024-08-10T02:44:29.469 helix_lsp::transport [ERROR] nu-lsp err <- " `\n"
2024-08-10T02:44:29.469 helix_lsp::transport [ERROR] nu-lsp err <- " help: set the `RUST_BACKTRACE=1` environment variable to display a\n"
2024-08-10T02:44:29.469 helix_lsp::transport [ERROR] nu-lsp err <- " backtrace.\n"
2024-08-10T02:44:29.469 helix_lsp::transport [ERROR] nu-lsp err <- "\n"
2024-08-10T02:44:29.474 helix_lsp::transport [ERROR] nu-lsp err: <- StreamClosed
Platform
Windows
Terminal Emulator
Windows Terminal 1.20.11781.0, wezterm 20240203-110809-5046fc22
Installation Method
source
Helix Version
24.07-137-g91e642ce