ついでのような vs ついでに what's the difference here?


彼に買っていくついでのような感じになっている気がするのは、きっと気のせいだ。

The character is buying sweets for someone, when in the middle of it he also
decides to buy something for his friend (彼)

What does ついでのような here add over ついでに

"The hunch I have that it became the sense of "I may as well buy something for
him" is surely my imagination"? (very literally)




It's not particularly a matter of added nuance, but more of understanding ついで
as a noun.

[Daijisen](https://dictionary.goo.ne.jp/word/%E3%81%A4%E3%81%84%E3%81%A7/#jn-146090)
has the following:

> １ あることを行うときに、いっしょに他のことにも利用できる機会。「―があったら届けてください」「―の折に立ち寄る」

Xのついで roughly means _the opportunity that was brought about by X_. In Xのついで
**に** Yする, X is the main thing and Y is secondary ('do Y **at** the
opportunity accompanying doing X').

Slightly by extension, Xのついで is often used as 'a thing that is secondary to
X'. 彼に買っていくついで means 'a secondary thing attached to buying the sweets for him'
and のような感じになっている just literally 'something like'. In the sentence, the subject
(which should be something like 'buying sweets for somebody') is omitted, and
the whole phrase means buying the sweets for him feels like the main thing.

