In that sentence, walking is not a gerund, no. A gerund acts like a noun, and you can't have a noun after while . It's part of a verb in the past progressive tense.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.