diff --git a/CHANGELOG.md b/CHANGELOG.md index 8effc78..81749c4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ This version is based on Jujutsu 0.20. - `gg.queries.log-page-size` setting was not being respected. - Removed <CR> character which rendered as a circle in the author display on some Linux systems. - Improved button/control font display on Linux. +- Fixed a panic attempting to display delete/delete conflicts in the right pane. ## [0.18.0](releases/tag/v0.18.0) This version is based on Jujutsu 0.18. diff --git a/src-tauri/src/worker/queries.rs b/src-tauri/src/worker/queries.rs index 158516e..aa5083f 100644 --- a/src-tauri/src/worker/queries.rs +++ b/src-tauri/src/worker/queries.rs @@ -297,10 +297,12 @@ pub fn query_revision(ws: &WorkspaceSession, id: RevId) -> Result { MaterializedTreeValue::Conflict { contents, .. } => { let mut hunks = get_unified_hunks(3, &contents, &[])?; - conflicts.push(RevConflict { - path: ws.format_path(path), - hunk: hunks.pop().unwrap(), - }); + if let Some(hunk) = hunks.pop() { + conflicts.push(RevConflict { + path: ws.format_path(path), + hunk, + }); + } } _ => { log::warn!("nonresolved tree entry did not materialise as conflict");