Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kirawi committed Feb 19, 2023
1 parent 18459f8 commit e9ff360
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions helix-view/src/document.rs
Original file line number Diff line number Diff line change
Expand Up @@ -724,9 +724,8 @@ impl Document {
let mut file = std::fs::File::open(&path)?;
let (rope, ..) = from_reader(&mut file, Some(encoding))?;

// TODO: Handle error
if self.load_history().is_err() {
panic!();
if let Err(e) = self.load_history() {
log::error!("{}", e);
// Calculate the difference between the buffer and source text, and apply it.
// This is not considered a modification of the contents of the file regardless
// of the encoding.
Expand All @@ -735,7 +734,6 @@ impl Document {
self.append_changes_to_history(view);
self.reset_modified();
}
log::info!("{:#?}", self.history.get_mut());
self.last_saved_time = SystemTime::now();

self.detect_indent_and_line_ending();
Expand Down

0 comments on commit e9ff360

Please sign in to comment.