status: improve the behavior when operating on selections
Improve the usability when interacting with selections in the status
widget. Ensure that all files are processed in a sensible way without
surprises.
We now can operate on both header items and individual files in a single
operation. When the header items are selected, we now detect when
modified and untracked headers are both selected, and correctly stage
all files in this situation.
If a header item such as "Modified" is selected alongside individually
selected Untracked files, the behavior is now that all modified files
and just the selected subset of untracked files is staged.
We can now use ctrl-a to select everything followed by ctrl-s and the
files will be staged as expected.
Closes #1117
Reported-by: nyanpasu64 <nyanpasu64@tuta.io>
Signed-off-by: David Aguilar <davvid@gmail.com>