diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index eb0ccd0ba7ef7..4b248ad5e4180 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -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. @@ -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();