refactor: move 'global' data into Application

Some applications move their 'global' data into a struct called `App` or
`Application`. This makes it very clear what data belongs to the
'global' scope or in other words, to the application itself.
This commit is contained in:
Thomas Frans
2023-05-22 22:22:52 +02:00
committed by Henrik Friedrichsen
parent b6e5495128
commit 6d32f3d1f8
4 changed files with 384 additions and 330 deletions

View File

@@ -2,6 +2,7 @@ use std::collections::HashMap;
use std::sync::Arc;
use std::time::Duration;
use crate::application::UserData;
use crate::command::{
parse, Command, GotoMode, JumpMode, MoveAmount, MoveMode, SeekDirection, ShiftMode, TargetMode,
};
@@ -19,7 +20,6 @@ use crate::ui::help::HelpView;
use crate::ui::layout::Layout;
use crate::ui::modal::Modal;
use crate::ui::search_results::SearchResultsView;
use crate::UserData;
use cursive::event::{Event, Key};
use cursive::traits::View;
use cursive::views::Dialog;