> IIRC, magit-stage-item only looks at the region when the cursor is
> inside a diff hunk, and it assumes you're trying to stage some of the
> lines in the hunk without staging the whole thing.
>
> Seeing all the files in the magit-section structure is a red herring.
> The sections form a tree with pointers to parents and children, so if
> you print one out you'll actually see every section in the buffer.

So, does this mean the behavior I described as a bug is actually a
feature request?

The behavior I was expecting was: if I have 4 files with unstaged
changes displayed a level II (with no hunks showing), then I
shift-arrow across two of them and press 's', these two files are
staged. Right now only the first one is.

At the moment the manual says "If the region is active when you type s
or u, only the changes in the region are staged or unstaged.", but I
see now how this may be referring to hunks only, not to entire files.
Then one way to fix the confusion I encountered would to add a short
clarification note in that paragraph.

Reply via email to