@mathenglish4all
Yes, you are correct. The appropriate choice is "was walking."
So, the sentence should read: "Yesterday, I was walking to the library when he saw me."
Here's why:
- "Was walking" uses the past continuous tense, which is appropriate for describing an action that was ongoing at