fix: remove panic
This commit is contained in:
parent
74e08a67ad
commit
50bdfbe35c
1 changed files with 6 additions and 3 deletions
|
@ -93,10 +93,13 @@ pub(super) fn register_hooks(handlers: &Handlers) {
|
|||
return Ok(());
|
||||
};
|
||||
|
||||
let hunks = doc.diff_handle().unwrap().load();
|
||||
let Some(hunks) = doc.diff_handle() else {
|
||||
return Ok(());
|
||||
};
|
||||
|
||||
let (inserted_lines_count, deleted_lines_count) =
|
||||
hunks.inserted_and_deleted_before_line(cursor_line as usize);
|
||||
let (inserted_lines_count, deleted_lines_count) = hunks
|
||||
.load()
|
||||
.inserted_and_deleted_before_line(cursor_line as usize);
|
||||
|
||||
send_blocking(
|
||||
&tx,
|
||||
|
|
Loading…
Add table
Reference in a new issue