Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kirawi committed Jan 20, 2023
1 parent 9f7f0dc commit 68d3936
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 5 deletions.
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/enhancement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Objective

- Describe the objective or issue this PR addresses.
- If you're fixing a specific issue, say "Fixes #X".

## Solution

- Describe the solution used to achieve the objective above.

---

## Changelog

> This section is optional. If this was a trivial fix, or has no externally-visible impact, you can delete this section.
- What changed as a result of this PR?
- If applicable, organize changes under "Added", "Changed", or "Fixed" sub-headings
- Stick to one or two sentences. If more detail is needed for a particular change, consider adding it to the "Solution" section
- If you can't summarize the work, your change may be unreasonably large / unrelated. Consider splitting your PR to make it easier to review and merge!

Empty file.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions helix-view/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ helix-vcs = { version = "0.6", path = "../helix-vcs" }

winapi = "0.3"
sha1_smol = "1.0"
either = "1.8"

# Conversion traits
once_cell = "1.17"
Expand Down
1 change: 1 addition & 0 deletions helix-view/src/session/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub mod state;
pub mod undo;

use std::{
fs::{File, OpenOptions},
Expand Down
6 changes: 1 addition & 5 deletions helix-view/src/session/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ use std::path::PathBuf;
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct BufferList(pub Vec<PathBuf>);

#[derive(Debug)]
pub struct State {
buffers
buffers: Vec<PathBuf>,
}

28 changes: 28 additions & 0 deletions helix-view/src/session/undo.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
use std::io::Result;
use std::path::PathBuf;

use either::Either;
use helix_core::history::History;

pub struct UndoFile<'a> {
path: PathBuf,
history: Either<History, &'a History>,
}

impl<'a> UndoFile<'a> {
fn serialize(&self) -> Result<()> {
todo!()
}

fn deserialize() -> Result<Self> {
todo!()
}

fn serialize_transaction(&self) -> Result<()> {
todo!()
}

fn deserialize_transaction(&self) -> Result<()> {
todo!()
}
}

0 comments on commit 68d3936

Please sign in to comment.