Skip to content

Commit e9ff360

Browse files
committed
wip
1 parent 18459f8 commit e9ff360

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

helix-view/src/document.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -724,9 +724,8 @@ impl Document {
724724
let mut file = std::fs::File::open(&path)?;
725725
let (rope, ..) = from_reader(&mut file, Some(encoding))?;
726726

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

741739
self.detect_indent_and_line_ending();

0 commit comments

Comments
 (0)