rename AppSection -> AppFocus

This commit is contained in:
🪞👃🪞 2024-07-12 19:11:47 +03:00
parent 94738d3e89
commit 58cd51dfbf
7 changed files with 19 additions and 18 deletions

View file

@ -1,4 +1,4 @@
use crate::{core::*, model::{App, AppSection}};
use crate::{core::*, model::{App, AppFocus}};
pub const KEYMAP_FOCUS: &'static [KeyBinding<App>] = keymap!(App {
[Char(';'), NONE, "command", "open command palette", |app: &mut App| {
@ -19,14 +19,14 @@ pub const KEYMAP_FOCUS: &'static [KeyBinding<App>] = keymap!(App {
pub fn focus_next (app: &mut App) -> Usually<bool> {
app.section.next();
app.transport.focused = app.section == AppSection::Transport;
app.transport.focused = app.section == AppFocus::Transport;
app.transport.entered = app.entered;
Ok(true)
}
pub fn focus_prev (app: &mut App) -> Usually<bool> {
app.section.prev();
app.transport.focused = app.section == AppSection::Transport;
app.transport.focused = app.section == AppFocus::Transport;
app.transport.entered = app.entered;
Ok(true)
}