From af7092cf3b66e9efaa4d4dfbff9a8fc2c37b54cc Mon Sep 17 00:00:00 2001 From: Shafkath Shuhan Date: Fri, 20 Jan 2023 12:28:40 -0500 Subject: [PATCH] wip --- helix-view/src/session/state.rs | 8 -------- helix-view/src/session/undo.rs | 35 +++++++++++++++++---------------- 2 files changed, 18 insertions(+), 25 deletions(-) delete mode 100644 helix-view/src/session/state.rs diff --git a/helix-view/src/session/state.rs b/helix-view/src/session/state.rs deleted file mode 100644 index e4c359e64ab6f..0000000000000 --- a/helix-view/src/session/state.rs +++ /dev/null @@ -1,8 +0,0 @@ -use std::path::PathBuf; - -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)] -pub struct State { - buffers: Vec, -} diff --git a/helix-view/src/session/undo.rs b/helix-view/src/session/undo.rs index f719cf5a30194..fe241b6c729d1 100644 --- a/helix-view/src/session/undo.rs +++ b/helix-view/src/session/undo.rs @@ -1,28 +1,29 @@ use std::io::Result; use std::path::PathBuf; -use either::Either; use helix_core::history::History; +use helix_core::Transaction; -pub struct UndoFile<'a> { - path: PathBuf, - history: Either, +pub fn serialize(session: &mut Session, editor: &Editor) -> Result<()> { + todo!() } -impl<'a> UndoFile<'a> { - fn serialize(&self) -> Result<()> { - todo!() - } +pub fn deserialize(session: &Session, editor: &mut Editor) -> Result<()> { + todo!() +} - fn deserialize() -> Result { - todo!() - } +fn serialize_history(history: &History) -> Result<()> { + todo!() +} - fn serialize_transaction(&self) -> Result<()> { - todo!() - } +fn deserialize_history() -> Result { + todo!() +} + +fn serialize_transaction(transaction: &Transaction) -> Result<()> { + todo!() +} - fn deserialize_transaction(&self) -> Result<()> { - todo!() - } +fn deserialize_transaction() -> Result { + todo!() }