File tree 2 files changed +8
-1
lines changed
2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -75,6 +75,13 @@ impl DiffHandle {
75
75
}
76
76
}
77
77
78
+ pub fn try_load ( & self ) -> Option < Diff > {
79
+ Some ( Diff {
80
+ diff : self . diff . try_read ( ) ?,
81
+ inverted : self . inverted ,
82
+ } )
83
+ }
84
+
78
85
/// Updates the document associated with this redraw handle
79
86
/// This function is only intended to be called from within the rendering loop
80
87
/// if called from elsewhere it may fail to acquire the render lock and panic
Original file line number Diff line number Diff line change @@ -1590,7 +1590,7 @@ impl Document {
1590
1590
// file in the file system into what gix::blame knows about (gix::blame only
1591
1591
// knows about commit history, it does not know about uncommitted changes)
1592
1592
diff_handle
1593
- . load ( )
1593
+ . try_load ( ) ?
1594
1594
. hunks_intersecting_line_ranges ( std:: iter:: once ( ( 0 , cursor_line as usize ) ) )
1595
1595
. try_fold (
1596
1596
( 0 , 0 ) ,
You can’t perform that action at this time.
0 commit comments