killing buffers

This commit is contained in:
filipriec
2025-05-25 22:02:18 +02:00
parent 6e1997fd9d
commit d8f9372bbd
3 changed files with 42 additions and 28 deletions

View File

@@ -161,6 +161,7 @@ impl EventHandler {
return Ok(EventOutcome::Ok(message));
}
if !matches!(current_mode, AppMode::Edit | AppMode::Command) {
if let Some(action) = config.get_action_for_key_in_mode(
&config.keybindings.global, key_code, modifiers
@@ -176,6 +177,10 @@ impl EventHandler {
return Ok(EventOutcome::Ok("Switched to previous buffer".to_string()));
}
}
"close_buffer" => {
let message = buffer_state.close_buffer_with_intro_fallback();
return Ok(EventOutcome::Ok(message));
}
_ => {}
}
}