diff options
author | Ivan Tham | 2021-06-22 17:04:04 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-24 15:39:03 +0000 |
commit | 10548bf0e32209e02460021cc8ca4865c4c75bf7 (patch) | |
tree | bed9421daebdf404ce833d797e32e2c1f515a041 /helix-term/src/application.rs | |
parent | 15ae2e7ef1a7c33733c999e9018cca22cdae1da9 (diff) |
Fix previous broken refactor key into helix-view
Need to be used for autoinfo
Revert "Revert "Refactor key into helix-view""
This reverts commit 10f9f72232f5789323d689bf0f9cd359715770d6.
Diffstat (limited to 'helix-term/src/application.rs')
-rw-r--r-- | helix-term/src/application.rs | 5 |
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() { |