File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -724,9 +724,8 @@ impl Document {
724
724
let mut file = std:: fs:: File :: open ( & path) ?;
725
725
let ( rope, ..) = from_reader ( & mut file, Some ( encoding) ) ?;
726
726
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) ;
730
729
// Calculate the difference between the buffer and source text, and apply it.
731
730
// This is not considered a modification of the contents of the file regardless
732
731
// of the encoding.
@@ -735,7 +734,6 @@ impl Document {
735
734
self . append_changes_to_history ( view) ;
736
735
self . reset_modified ( ) ;
737
736
}
738
- log:: info!( "{:#?}" , self . history. get_mut( ) ) ;
739
737
self . last_saved_time = SystemTime :: now ( ) ;
740
738
741
739
self . detect_indent_and_line_ending ( ) ;
You can’t perform that action at this time.
0 commit comments