Skip to content

Commit f3afca8

Browse files
authored
Merge pull request #8323 from gitbutlerapp/fix-commit-goes-here
fix(branchlist): improve commit selection logic during committing
2 parents 9684391 + 6c4225f commit f3afca8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/desktop/src/components/v3/BranchList.svelte

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,12 @@
254254
{@const selected =
255255
commit.id === selectedCommitId && branchName === selectedBranchName}
256256
{#if isCommitting}
257+
{@const selectedForCommit =
258+
(selectedCommitId === undefined || commit.id === selectedCommitId) &&
259+
branchName === selectedBranchName}
257260
<!-- Only commits to the base can be `last`, see next `CommitGoesHere`. -->
258261
<CommitGoesHere
259-
{selected}
262+
selected={selectedForCommit}
260263
{first}
261264
last={false}
262265
onclick={() => uiState.stack(stackId).selection.set({ branchName, commitId })}

0 commit comments

Comments
 (0)