diff options
Diffstat (limited to 'src/app.rs')
| -rw-r--r-- | src/app.rs | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -29,7 +29,7 @@ pub struct App { impl App { pub fn new() -> Self { let sheet_id = Register::create(10, 50); - GlobalState::instance_mut() + GlobalState::get() .view .set_active_sheet(Some(sheet_id)); @@ -42,13 +42,13 @@ impl App { } pub fn run(mut self, terminal: &mut tui::Tui) -> io::Result<()> { - if let Err(e) = lua::source(&config::constants::USER_RC_PATH) { + if let Err(e) = lua::source(&config::env::USER_RC_PATH) { tui::restore()?; println!("{}", e); return Ok(()); } - while !{ GlobalState::instance().exit } { + while !{ GlobalState::get().exit } { terminal.draw(|frame| { self.render_frame(frame); @@ -84,7 +84,7 @@ impl App { } fn handle_key_event(&mut self, event: KeyEvent) { - let focus = { GlobalState::instance().active_window }; + let focus = { GlobalState::get().active_window }; let populate = GlobalKeyMap::handle(event); if populate { @@ -98,7 +98,7 @@ impl App { } fn area(&self, area: Rect) -> (Rect, Option<Rect>, Option<Rect>) { - let state = GlobalState::instance(); + let state = GlobalState::get(); let mut view = area; let mut editor = None; let mut log = None; |