Open mkapra opened 1 year ago
Which themes are you switching between? Also, could you reproduce this with the the RUST_BACKTRACE
environment variable set to full
?
I am using the themes rose_pine_(dawn|moon)
I tried setting RUST_BACKTRACE
to 1
but the printed error was the same. With RUST_BACKTRACE = full
its the same output too.
Maybe this is interesting too: If I call :config-reload
then the theme switch is made without any error.
The error will be the same, but the backtrace is useful for debugging.
With that message I meant that there is no stack trace. Just the same message as before:
> RUST_BACKTRACE=full hx
thread 'main' panicked at 'index out of bounds: the len is 72 but the index is 81', /home/runner/work/helix/helix/helix-view/src/theme.rs:297:9
stack backtrace:
Bus error
I tried on the version (master 23.05 843ae971) and I have no problem at all.
My setup is not the same as yours (WSL, Arch), but it's changing both themes (rose pine moon and dawn) with :config-reload
and with pkill -USR1 hx
.
I'd like to help you but I can't reproduce the bug on my side.
Summary
helix panics when changing the theme in the configuration file on USR1 signal.
Reproduction Steps
I tried this: 1. `:config-open` 2. Change the theme to another theme and save the configuration 3. Spawn a new terminal and run `pkill -USR1 hx` I expected this to happen: The configuration gets reloaded and the color scheme changes. Instead, this happened: ``` thread 'main' panicked at 'index out of bounds: the len is 72 but the index is 81', /home/runner/work/helix/helix/helix-view/src/theme.rs:297:9 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Bus error ``` ### Helix log~/.cache/helix/helix.log
``` 2023-06-26T17:25:32.665 helix_term::application [WARN] failed to load theme `rose_pine_dawn` - Theme: file not found for: rose_pine_dawn ``` The confusing part is here that it says it could not find the theme. When restarting helix the theme is working.