Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kirawi committed Feb 10, 2023
1 parent f6d370c commit 99f2b2c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion helix-view/src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,9 @@ impl Document {
let last_saved_revision = self.get_last_saved_revision();
let path = self.path().unwrap().clone();
let history = self.history.get_mut();
history.serialize(undo_file.get_mut()?, &path, last_saved_revision)?;
let undo_file = undo_file.get_mut()?;
undo_file.set_len(0)?;
history.serialize(undo_file, &path, last_saved_revision)?;
}
Ok(())
}
Expand Down
6 changes: 5 additions & 1 deletion helix-view/src/workspace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ impl FileLock {
std::fs::DirBuilder::new().recursive(true).create(parent)?;
}
}
OpenOptions::new().write(true).create(true).open(path)
OpenOptions::new()
.read(true)
.write(true)
.create(true)
.open(path)
}
}

Expand Down

0 comments on commit 99f2b2c

Please sign in to comment.