More generally, magit applies operations on whatever the cursor is on, when it makes sense to do so. This is very convenient e.g. for staging parts of a change at different granularities: I can stage everything, then unstage a file, then stage a hunk within that file. It only takes a few keypresses, compared to a long set of commands followed by dredging through add -pi.