Skip to content

Switch focus when working directory or stage becomes empty #216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

jonstodle
Copy link
Contributor

@jonstodle jonstodle commented Jul 29, 2020

If the focus is on the working directory and it becomes empty (no files are listed) by either staging the last file or using the Stage all command, the focus will be moved to the stage automatically. It works the same for when the stage becomes empty, by moving the focus to the working directory.

If the focus is on the diff area, the focus will not be moved when either the working directory or the stage becomes empty.

Fixes #215

If the focus is on the working directory and it becomes empty (no files are listed) by either staging the last file or using the _Stage all_ command, the focus will be moved to the stage automatically. It works the same for when the stage becomes empty, by moving the focus to the working directory.

If the focus is on the diff area, the focus will not be moved when either the working directory or the stage becomes empty.

Fixes gitui-org#215
@jonstodle jonstodle force-pushed the feat/215-move-focus-when-status-empty branch from a1fee69 to b294a65 Compare July 29, 2020 17:07
@extrawurst extrawurst merged commit 1c3295a into gitui-org:master Jul 29, 2020
@extrawurst
Copy link
Collaborator

@jonstodle thanks ❤️

@jonstodle jonstodle deleted the feat/215-move-focus-when-status-empty branch July 29, 2020 19:17
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.

Move to (un)staged when the current selection is empty
2 participants