vamolessa / pepper

simple and opinionated modal code editor for your terminal
https://vamolessa.github.io/pepper/
373 stars 15 forks source link

Resizing terminal crashes pepper #25

Closed feep closed 2 years ago

feep commented 2 years ago

Thanks

Hey, love pepper.

Excited to see a simple modern editor that can be extended.

Thank you for making it.

Environment

❯ sw_vers
ProductName:    macOS
ProductVersion: 12.1
BuildVersion:   21C52

❯ sysctl -n machdep.cpu.brand_string
Apple M1
# ARM

❯ kitty --version
kitty 0.24.0 created by Kovid Goyal
# same crash on Terminal.app Version 2.12 (443)

❯ cargo --version
cargo 1.58.0

❯ ./target/debug/pepper -v
pepper version 0.21.0

Issue

What did you do?

Resized the terminal.

What happened?

pepper crashed.

❯ tput cols; tput lines
80
23

❯ cargo build
# ... cut ...

❯ ./target/debug/pepper

# resized terminal, pepper crashed 

❯ tput cols; tput lines
80
48

❯ cat pepper-crash.txt 
File: pepper-crash.txt
panicked at 'internal error: entered unreachable code', pepper/src/platforms/bsd
.rs:176:26

Same issue with cargo install pepper-plugin-lsp or cargo build from 86a44b71.

vamolessa commented 2 years ago

Oh! I may have badly handled the resize signal on bsd. Would you mind testing 1d788b2?

If that works, I'll release 0.22.0 containing the fix!

Thanks for the report and for coding using pepper :)

feep commented 2 years ago

1d788b2 fixes it, thanks.

Closing.