The word <em>wishing </em>is used as a participle in this case. Although gerunds and participles look the same, they are used in different senses - gerunds generally denote nouns, whereas participles have more of an adverbial meaning.
Idiom "Hold your horses"
Simile "As red as a tomato"
Hyperbole "This food is hotter than the sun"
Metaphor "He was a walking encyclopedia"
Alliteration "Peter pepper picked a pickled pepper"
Personification "The sun smiled at me"
I hope it helped.