Merge remote-tracking branch 'nik-rev/gix-blame'
This commit is contained in:
commit
8229e746ae
2 changed files with 8 additions and 1 deletions
|
@ -75,6 +75,13 @@ impl DiffHandle {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn try_load(&self) -> Option<Diff> {
|
||||
Some(Diff {
|
||||
diff: self.diff.try_read()?,
|
||||
inverted: self.inverted,
|
||||
})
|
||||
}
|
||||
|
||||
/// Updates the document associated with this redraw handle
|
||||
/// This function is only intended to be called from within the rendering loop
|
||||
/// if called from elsewhere it may fail to acquire the render lock and panic
|
||||
|
|
|
@ -1602,7 +1602,7 @@ impl Document {
|
|||
// file in the file system into what gix::blame knows about (gix::blame only
|
||||
// knows about commit history, it does not know about uncommitted changes)
|
||||
diff_handle
|
||||
.load()
|
||||
.try_load()?
|
||||
.hunks_intersecting_line_ranges(std::iter::once((0, cursor_line as usize)))
|
||||
.try_fold(
|
||||
(0, 0),
|
||||
|
|
Loading…
Add table
Reference in a new issue