Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions codex-rs/git-tooling/src/ghost_commits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ pub fn restore_ghost_commit(repo_path: &Path, commit: &GhostCommit) -> Result<()
let repo_prefix = repo_subdir(repo_root.as_path(), repo_path);
let current_untracked =
capture_existing_untracked(repo_root.as_path(), repo_prefix.as_deref())?;
restore_to_commit_inner(repo_root.as_path(), repo_prefix.as_deref(), commit.id())?;
remove_new_untracked(
repo_root.as_path(),
commit.preexisting_untracked_files(),
commit.preexisting_untracked_dirs(),
current_untracked,
)?;
restore_to_commit_inner(repo_root.as_path(), repo_prefix.as_deref(), commit.id())
)
}

/// Restore the working tree to match the given commit ID.
Expand Down
5 changes: 3 additions & 2 deletions codex-rs/tui/src/bottom_pane/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,9 @@ impl BottomPane {
/// indicator is not active.
pub(crate) fn update_status_header(&mut self, header: String) {
if let Some(status) = self.status.as_mut() {
status.update_header(header);
self.request_redraw();
if status.update_header(header) {
self.request_redraw();
}
}
}

Expand Down
3 changes: 0 additions & 3 deletions codex-rs/tui/src/chatwidget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,9 +302,6 @@ impl ChatWidget {
}

fn set_status_header(&mut self, header: String) {
if self.current_status_header == header {
return;
}
self.current_status_header = header.clone();
self.bottom_pane.update_status_header(header);
}
Expand Down
8 changes: 5 additions & 3 deletions codex-rs/tui/src/status_indicator_widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,10 +97,12 @@ impl StatusIndicatorWidget {
}

/// Update the animated header label (left of the brackets).
pub(crate) fn update_header(&mut self, header: String) {
if self.header != header {
self.header = header;
pub(crate) fn update_header(&mut self, header: String) -> bool {
if self.header == header {
return false;
}
self.header = header;
true
}

#[cfg(test)]
Expand Down
Loading