diff options
author | Blaž Hrastnik | 2020-10-06 05:44:18 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2020-10-13 14:13:56 +0000 |
commit | b765c17896632e27857c7707a9d3d96bd49b8899 (patch) | |
tree | 8c9a95e1244c8839e2c21776bf73baee0a033d94 /helix-core/src/state.rs | |
parent | 0926904d4c7f8851d53adfad337bac59ac8f8fb4 (diff) |
Hacky undo/redo integration.
Diffstat (limited to 'helix-core/src/state.rs')
-rw-r--r-- | helix-core/src/state.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/helix-core/src/state.rs b/helix-core/src/state.rs index 9d51c8c5..ed0df9cf 100644 --- a/helix-core/src/state.rs +++ b/helix-core/src/state.rs @@ -1,6 +1,6 @@ use crate::graphemes::{nth_next_grapheme_boundary, nth_prev_grapheme_boundary, RopeGraphemes}; use crate::syntax::LOADER; -use crate::{Position, Range, Rope, RopeSlice, Selection, Syntax}; +use crate::{ChangeSet, Position, Range, Rope, RopeSlice, Selection, Syntax}; use anyhow::Error; use std::path::PathBuf; @@ -25,6 +25,8 @@ pub struct State { // pub syntax: Option<Syntax>, + pub changes: Option<ChangeSet>, + pub old_state: Option<(Rope, Selection)>, } #[derive(Copy, Clone, PartialEq, Eq)] @@ -50,6 +52,8 @@ impl State { mode: Mode::Normal, restore_cursor: false, syntax: None, + changes: None, + old_state: None, } } |