Skip to content

Fix updating validating selected lines when a diff changes - #913

Merged
shiftkey merged 5 commits into
masterfrom
patch-it-up
Feb 8, 2017
Merged

shiftkey merged 5 commits into
masterfrom
patch-it-up

Conversation

@joshaber

@joshaber joshaber commented Feb 7, 2017

Copy link
Copy Markdown
Contributor

Fixes #894

We were updating the selectedFiles selected lines, but we weren't including that updated file with its updated selection in the working directory.

@shiftkey
shiftkey self-requested a review February 8, 2017 08:28

@shiftkey shiftkey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, kicked the changes around on some tests and couldn't trigger the issue.

readonly repository: Repository
readonly workingDirectory: WorkingDirectoryStatus
readonly selectedPath: string | null
readonly selectedFile: WorkingDirectoryFileChange | null

This comment was marked as spam.

const changesState = stateAfterLoad.changesState

// A whole bunch of things could have happened since we initiated the diff load
if (!changesState.selectedFile) { return }

This comment was marked as spam.

@shiftkey
shiftkey merged commit f9c870c into master Feb 8, 2017
@shiftkey
shiftkey deleted the patch-it-up branch February 8, 2017 09:26
@joshaber joshaber mentioned this pull request Apr 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants