diff options
author | Benoît CORTIER | 2021-06-05 02:21:31 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2021-06-07 12:52:09 +0000 |
commit | 68affa3c598723a8b9451ef3dcceda83ae161e39 (patch) | |
tree | 06a6c0ed9f6e0483b138b44d969f4341206cf4c0 /helix-view/src/editor.rs | |
parent | d5de9183ef8392168b06131278554e483eddfff3 (diff) |
Implement register selection
User can select register to yank into with the " command.
A new state is added to `Editor` and `commands::Context` structs.
This state is managed by leveraging a new struct `RegisterSelection`.
Diffstat (limited to 'helix-view/src/editor.rs')
-rw-r--r-- | helix-view/src/editor.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/helix-view/src/editor.rs b/helix-view/src/editor.rs index fa8dea2f..b69ae22f 100644 --- a/helix-view/src/editor.rs +++ b/helix-view/src/editor.rs @@ -1,4 +1,4 @@ -use crate::{theme::Theme, tree::Tree, Document, DocumentId, View, ViewId}; +use crate::{theme::Theme, tree::Tree, Document, DocumentId, RegisterSelection, View, ViewId}; use tui::layout::Rect; use std::path::PathBuf; @@ -13,6 +13,7 @@ pub struct Editor { pub tree: Tree, pub documents: SlotMap<DocumentId, Document>, pub count: Option<usize>, + pub register: RegisterSelection, pub theme: Theme, pub language_servers: helix_lsp::Registry, @@ -57,6 +58,7 @@ impl Editor { tree: Tree::new(area), documents: SlotMap::with_key(), count: None, + register: RegisterSelection::default(), theme, language_servers, status_msg: None, |