  The Dirac equation with a U(1) vortex in the mass-term is solved in the
presence of magnetic-like fields at zero energy. By drawing an analogy to
classical mechanics, it is shown that the four-component Dirac equation in
arbitrary magnetic field always yields one zero-energy state. In the
time-reversal preserving, pseudo-magnetic field, however, the number of
zero-energy states may depend on the field's profile and sign. Some explicit
examples are worked out. Possible implications of these results for the charge
of the vortex and for the behavior of graphene in magnetic field are discussed.
