Skip to content
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

Move to (un)staged when the current selection is empty #215

Closed
jonstodle opened this issue Jul 27, 2020 · 2 comments · Fixed by #216
Closed

Move to (un)staged when the current selection is empty #215

jonstodle opened this issue Jul 27, 2020 · 2 comments · Fixed by #216
Assignees
Labels
enhancement New feature or request

Comments

@jonstodle
Copy link
Contributor

Is your feature request related to a problem? Please describe.
When using the Stage all command (or just when all items have been (un)staged. The focus should switch to the other view. There's isn't really a reason for the focus to remain in Unstaged changes, when all the files have been moved to Staged changes (and vice versa).

Describe the solution you'd like
When using Stage all or when all files have been moved from or to the "stage", the focus should change to the relevant area where there are files present.

Describe alternatives you've considered
None

Additional context
...

@extrawurst
Copy link
Owner

Hey @jonstodle that's a good idea! Are you up for it? :)

@extrawurst extrawurst added the enhancement New feature or request label Jul 27, 2020
@jonstodle
Copy link
Contributor Author

Yes

jonstodle added a commit to jonstodle/gitui that referenced this issue 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 extrawurst#215
extrawurst pushed a commit that referenced this issue 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants