Pass the target pane when getting a pane's vars.

When determining the details about the pane and setting the environment
variables corresponding to that pane, use the target-pane `-t` argument
to get the correct values, otherwise only the active pane's values are
returned.