fix: Check for value instead of unwrapping on None (case when terminal is closed)
@@ -224,11 +224,10 @@ fn paint(
let (mode, color) = {
let mode =
if data.focus_area == FocusArea::Panel(PanelKind::Terminal) {
- data.terminal
- .terminals
- .get(&data.terminal.active_term_id)
- .unwrap()
- .mode
+ match data.terminal.terminals.get(&data.terminal.active_term_id) {
+ Some(terminal) => terminal.mode,
+ None => Mode::Normal
+ }
} else {
data.main_split
.active_editor()
