aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/application.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r--helix-term/src/application.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/helix-term/src/application.rs b/helix-term/src/application.rs
index 6f2f824b..f9c6c9c1 100644
--- a/helix-term/src/application.rs
+++ b/helix-term/src/application.rs
@@ -44,6 +44,7 @@ pub struct Application {
compositor: Compositor,
editor: Editor,
+ // TODO should be separate to take only part of the config
config: Config,
theme_loader: Arc<theme::Loader>,
@@ -54,7 +55,7 @@ pub struct Application {
}
impl Application {
- pub fn new(mut args: Args, config: Config) -> Result<Self, Error> {
+ pub fn new(mut args: Args, mut config: Config) -> Result<Self, Error> {
use helix_view::editor::Action;
let mut compositor = Compositor::new()?;
let size = compositor.size();
@@ -87,7 +88,7 @@ impl Application {
let mut editor = Editor::new(size, theme_loader.clone(), syn_loader.clone());
- let mut editor_view = Box::new(ui::EditorView::new(config.keymaps.clone()));
+ let mut editor_view = Box::new(ui::EditorView::new(std::mem::take(&mut config.keys)));
compositor.push(editor_view);
if !args.files.is_empty() {